home *** CD-ROM | disk | FTP | other *** search
/ IBM OEM Software Product … CD For PC Manufacturers / IBM OEM Software - Product Sampler CD for PC Manufacturers.iso / InternetIntranets / Notes / INSTALL.DSK / CALLBACK.LSS < prev    next >
Text File  |  1997-09-18  |  122KB  |  3,668 lines

  1.  
  2. ''*********************************************************************
  3. ''
  4. ''   Module Name:   cominst\toolkit\callback.lss
  5. ''
  6. ''   Module Code:   COMINST
  7. ''
  8. ''   Author:        Dave Dupre
  9. ''
  10. ''   Creation Date: Wednesday January 5, 1994
  11. ''
  12. ''   Copyright Lotus Development Corporation, (c) 1994
  13. ''
  14. ''
  15. ''   Description:
  16. ''      
  17. ''
  18. ''   Additional authors: MZ
  19. ''
  20. ''   Change History:
  21. ''   $Log:   
  22. '' 
  23. ''    Rev 1.162.1.0   Oct 19 1995 13:54:24   cmoy
  24. '' merged fe3 to fe5
  25. '' 
  26. ''    Rev 1.162   28 Sep 1995 10:26:40   amontalv
  27. '' Changed how the default folder is gotten to allow clients to change it when they
  28. '' change default program group name.  This broke when I changed the UI for folders.
  29. '' 
  30. ''    Rev 1.161   27 Sep 1995 16:40:52   amontalv
  31. '' Don't allow entries of illegal characters or blank fields for program folders.
  32. '' 
  33. ''    Rev 1.160   26 Sep 1995 13:01:48   amontalv
  34. '' Having problem redisplaying item that was previously clicked on after clicking on
  35. '' tab, so reset gPrevInst% when you click on tab.
  36. '' 
  37. ''    Rev 1.159   26 Sep 1995 12:40:00   amontalv
  38. '' Changed check for invalid characters.
  39. '' 
  40. ''    Rev 1.158   25 Sep 1995 17:45:42   amontalv
  41. '' Added code to check for valid folder item.  If invalid do not allow user to
  42. '' change selection or hit okay.
  43. '' 
  44. ''    Rev 1.157   Sep 25 1995 10:58:40   cmoy
  45. '' Fixed declaration errors
  46. '' 
  47. ''    Rev 1.156   22 Sep 1995 16:44:24   tveerapp
  48. '' Fixed spr# LSCR2VZVGB. GETLOTUSAPPDIRCB changes.
  49. '' 
  50. ''    Rev 1.155   22 Sep 1995 15:07:12   jdonohue
  51. '' Remove SYM_LOTUSUSERDIR$ processing
  52. '' 
  53. ''    Rev 1.154   22 Sep 1995 12:17:10   amontalv
  54. '' Check for focus before making change to Program Folder entry in tree from edit line.
  55. '' 
  56. ''    Rev 1.153   21 Sep 1995 15:40:10   amontalv
  57. '' Fixed notebook focus issues.  Had to call text1 and bitmap window directly.
  58. '' Also changed check for updating these.
  59. '' 
  60. ''    Rev 1.152   21 Sep 1995 09:33:56   jdonohue
  61. '' Disable browse buttons 2 and 3 for a language install
  62. '' 
  63. ''    Rev 1.151   20 Sep 1995 13:38:08   glutz
  64. '' CUSTOM2CB disables the path change button if the selected component
  65. '' belongs in the component dir.
  66. '' 
  67. ''    Rev 1.150   19 Sep 1995 15:30:00   amontalv
  68. '' After creating new folder, put focus in edit box.
  69. '' 
  70. ''    Rev 1.149   Sep 14 1995 18:30:06   cmoy
  71. '' fixed focus problem (Mak Inada)
  72. '' 
  73. ''    Rev 1.148   14 Sep 1995 12:26:20   cmoy
  74. '' fixed folder to foldername
  75. '' 
  76. ''    Rev 1.147   13 Sep 1995 16:31:34   amontalv
  77. '' Resourced New folder name.
  78. '' 
  79. ''    Rev 1.146   13 Sep 1995 16:26:36   amontalv
  80. '' Changed processing for program folder input dialog.
  81. '' 
  82. ''    Rev 1.145   07 Sep 1995 15:21:50   amontalv
  83. '' Added check to make sure folders names are not blank.
  84. '' 
  85. ''    Rev 1.144   05 Sep 1995 16:39:26   amontalv
  86. '' Added logic to get readnet.txt out of temp directory if it exists.
  87. '' 
  88. ''    Rev 1.143   31 Aug 1995 15:09:22   callanan
  89. '' Displaying tip in custom dlg using the setsymbol, to avoid losing bitmap.  Also added param to SetCustomInfo
  90. '' 
  91. ''    Rev 1.142   29 Aug 1995 08:29:10   jdonohue
  92. '' Changed symbol of USERDIR to LOTUSUSERDIR
  93. '' 
  94. ''    Rev 1.141   25 Aug 1995 14:22:56   amontalv
  95. '' Always calculate size when item gets clicked.
  96. '' 
  97. ''    Rev 1.140   24 Aug 1995 07:55:18   jdonohue
  98. '' Added SYM_USERDIR and set it
  99. '' 
  100. ''    Rev 1.139   23 Aug 1995 15:33:14   cmoy
  101. '' Moved MAX_NO_DRIVECOMBOS to toolkit.lss
  102. '' 
  103. ''    Rev 1.138   21 Aug 1995 14:24:48   tveerapp
  104. '' Made MAX_NO_DRIVECOMBOS a POUBLIC CONST.
  105. '' 
  106. ''    Rev 1.137   18 Aug 1995 17:27:44   tveerapp
  107. '' Fixed ResetWinWinSys to fix spr#JHAE2V7UNL.(This involved backing out
  108. '' Jdonahue's change on July29.)
  109. '' 
  110. ''    Rev 1.136   18 Aug 1995 16:38:24   glutz
  111. '' Took out a print statement.
  112. '' 
  113. ''    Rev 1.135   18 Aug 1995 16:35:54   glutz
  114. '' Had to make sure SetCustomInfo does not enable IDC_B1 if it is not
  115. '' visible.
  116. '' 
  117. ''    Rev 1.134   18 Aug 1995 11:13:34   callanan
  118. '' If item in custom dlg has no bmp set ID_BMP1 to null string, this will cause
  119. '' the bitmap symbol handler to clear out the old bmp.
  120. '' 
  121. ''    Rev 1.133   17 Aug 1995 14:16:54   callanan
  122. '' Changed the default way to handle bitmaps in dialogs
  123. '' 
  124. ''    Rev 1.132   14 Aug 1995 10:35:00   callanan
  125. '' Changed CUSTOM2CB to only display bitmap once when select
  126. '' 
  127. ''    Rev 1.131   11 Aug 1995 10:44:16   jdonohue
  128. '' Disable path change for server language install
  129. '' 
  130. ''    Rev 1.130   08 Aug 1995 17:03:06   tveerapp
  131. '' Added the browse functionality to GETLOTUSAPPDIRCB.
  132. '' 
  133. ''    Rev 1.129   08 Aug 1995 16:18:54   glutz
  134. '' Had to make sure in sizeofinstallcb the edit boxes only get validated
  135. '' if they exist.
  136. '' 
  137. ''    Rev 1.128   07 Aug 1995 08:28:24   mmeth
  138. '' Part 2 of fix for  SPR# JHOH2M4HZL:
  139. '' In WELCOMECB changed the length of the truncations from 30 to 80.
  140. '' 
  141. ''    Rev 1.127   05 Aug 1995 15:51:36   tveerapp
  142. '' Removed a space that was put in when the second path was being validated
  143. '' in SIZEOFINSTALLCB.
  144. '' 
  145. ''    Rev 1.126   05 Aug 1995 15:05:12   tveerapp
  146. '' Fixed an spr. Changed SIZEOFINSTALLCB. For server components dir use
  147. '' IDC_EDIT3 and IDC_COMBO3 to be consistent with the dialog templates.
  148. '' 
  149. ''    Rev 1.125   04 Aug 1995 16:39:30   glutz
  150. '' ParentDirCB and SizeofInstallCB always start out with dirchanged true.
  151. '' 
  152. ''    Rev 1.124   04 Aug 1995 11:15:06   jdonohue
  153. '' Don't allow user path changes for a language install
  154. '' 
  155. ''    Rev 1.123   01 Aug 1995 16:01:30   glutz
  156. '' Commented out 4 lines in SetCustomInfo so paths would show for tabs in
  157. '' server install.
  158. '' 
  159. ''    Rev 1.122   30 Jul 1995 07:51:20   glutz
  160. '' Added unc paths to Lot_SetSpaceDirTip.
  161. '' 
  162. ''    Rev 1.121   29 Jul 1995 17:44:12   jdonohue
  163. '' Set WINDIR and WINSYSDIR back to defaults if change from server to other
  164. '' 
  165. ''    Rev 1.120   29 Jul 1995 15:39:08   jdonohue
  166. '' PARENTDIRCB set dirChanged to true always for server since we fiddle with 
  167. '' drives list
  168. '' 
  169. ''    Rev 1.119   28 Jul 1995 16:47:56   pdonahue
  170. '' modified sizeofinstall in case of server to use IDC_Edit3 for lotusapp.
  171. '' 
  172. ''    Rev 1.118   27 Jul 1995 13:00:04   amontalv
  173. '' Changed the program manager group name to not do certain check if we 
  174. '' are in Win95.
  175. '' 
  176. ''    Rev 1.117   26 Jul 1995 10:36:52   pdonahue
  177. '' added error message for invalid folder name in case of win95 install.
  178. '' 
  179. ''    Rev 1.116   25 Jul 1995 12:43:10   jdonohue
  180. '' Grey out change path when on tab and item not selected
  181. '' 
  182. ''    Rev 1.115   20 Jul 1995 15:52:00   glutz
  183. '' SetCustomInfo now calls GetFreeSpaceForDrive every time a tab changes.
  184. '' 
  185. ''    Rev 1.114   20 Jul 1995 10:55:24   glutz
  186. '' GetFreeSpaceForDrive now returns K bytes so I made changes accordingly.
  187. '' 
  188. ''    Rev 1.113   17 Jul 1995 16:39:44   glutz
  189. '' Callback functions that have browse buttons now call ValidateBrowse if 
  190. '' IDC_BROWSE is the callback message.
  191. '' 
  192. ''    Rev 1.112   17 Jul 1995 13:17:30   amontalv
  193. '' Added check to see if current folder existed after the removal of a folder.
  194. '' If the folder exists then the Remove Folder button must be disabled, which it
  195. '' is, but the focus must be moved off this disabled button.  This part was
  196. '' missing and I added it here.
  197. '' 
  198. ''    Rev 1.111   14 Jul 1995 14:50:08   glutz
  199. '' SetCustomInfo had wrong return val type for call to LcbGetChapterCost.
  200. '' 
  201. ''    Rev 1.110   11 Jul 1995 12:04:56   glutz
  202. '' In CUSTOM1CB if it's a server install IDC_TEXT4 and IDC_B1 are hidden
  203. '' and IDC_TEXT8 is made visible.
  204. '' 
  205. ''    Rev 1.109   11 Jul 1995 08:53:08   glutz
  206. '' Disable IDC_B1 in CUSTOM1CB when the control is hidden.
  207. '' 
  208. ''    Rev 1.108   10 Jul 1995 15:02:16   glutz
  209. '' Set IDC_TEXT2 after browse in DISTSIZEINSTALLCB.
  210. '' 
  211. ''    Rev 1.107   05 Jul 1995 14:24:52   amontalv
  212. '' Added test to check if path already exists before accepting it on New Folder.
  213. '' 
  214. ''    Rev 1.106   30 Jun 1995 22:11:14   amontalv
  215. '' Added code to display Current Folder in Select Folder dialog.  And ended up adding
  216. '' a hack to allow me to display this when the dialog first comes up.
  217. '' 
  218. ''    Rev 1.105   30 Jun 1995 10:49:20   glutz
  219. '' Straightend out some problems with second path in sizeofinstallcb.
  220. '' 
  221. ''    Rev 1.104   29 Jun 1995 11:47:28   jdonohue
  222. '' Took out print statement
  223. '' 
  224. ''    Rev 1.103   28 Jun 1995 19:57:30   amontalv
  225. '' Changed the possible length of program group from 30 to 254 characters.
  226. '' 
  227. ''    Rev 1.102   28 Jun 1995 19:49:22   amontalv
  228. '' Added check to make sure you couldn't create a folder
  229. '' with just spaces.
  230. '' 
  231. ''    Rev 1.101   26 Jun 1995 19:06:28   amontalv
  232. '' Added check for length of path for folders.
  233. '' 
  234. ''    Rev 1.100   22 Jun 1995 16:44:12   glutz
  235. '' SIZEOFINSTALLCB has to differentiate between dirChanged and dischanged2.
  236. '' 
  237. ''    Rev 1.99   22 Jun 1995 15:30:08   tveerapp
  238. '' Changed WELCOMECB. case IDC_BACK (which is called when the esc. key is hit).
  239. '' Allow the user to quit from the Welcome dialog when the esc. key is hit.
  240. '' 
  241. ''    Rev 1.98   22 Jun 1995 10:21:56   pdonahue
  242. '' fixed merge error
  243. '' 
  244. ''    Rev 1.97   22 Jun 1995 09:31:06   pdonahue
  245. '' fixed bug in additional directory code,
  246. '' 
  247. ''    Rev 1.96   21 Jun 1995 14:28:46   glutz
  248. '' Simplified UNC and browse validations in callbacks
  249. '' 
  250. ''    Rev 1.95   19 Jun 1995 10:25:36   amontalv
  251. '' Put in code to add function to New Folder button and Remove Folder button.  Also
  252. '' fixed some of the selection problems in the tree list.
  253. '' 
  254. ''    Rev 1.94   16 Jun 1995 13:53:36   glutz
  255. '' Don't set drvIndex if SelectDriveCombo returns false
  256. '' 
  257. ''    Rev 1.93   16 Jun 1995 11:50:02   amontalv
  258. '' Made program groups list box get entries form Common Program Groups instead of
  259. '' Current user program groups.  Also made it so that it would be easier to display
  260. '' both if necessary.
  261. '' 
  262. ''    Rev 1.92   14 Jun 1995 22:12:10   amontalv
  263. '' Gave program folder a new look.
  264. '' 
  265. ''    Rev 1.91   14 Jun 1995 16:31:38   amontalv
  266. '' Fixed problem with 1 Program Groups.  Look through the registry for
  267. '' program groups and display them for the user.  Most of the code
  268. '' is in C in lotusui.c.  Put calls to registry functions in regwrap.
  269. '' 
  270. ''    Rev 1.90   12 Jun 1995 17:40:36   cmoy
  271. '' fixed bug in changing paths
  272. '' 
  273. ''    Rev 1.89   12 Jun 1995 14:36:54   amontalv
  274. '' SPR KHAN2SSMDL - Resourced name of program group and added to end.
  275. '' 
  276. ''    Rev 1.88   09 Jun 1995 16:41:04   glutz
  277. '' Fixed bug with browse not chaging drive letter
  278. '' 
  279. ''    Rev 1.87   07 Jun 1995 20:59:26   amontalv
  280. '' Moved setting of Tree item around so that it would be set correctly
  281. '' 
  282. ''    Rev 1.86   07 Jun 1995 17:51:28   amontalv
  283. '' Don't set the selected folder again at OK of callback.
  284. '' 
  285. ''    Rev 1.85   07 Jun 1995 16:30:34   amontalv
  286. '' Changed the Win95 start folder so that it initializes
  287. '' earlier in the program.  This should make automation
  288. '' easier to implement for it.  There are still a couple of
  289. '' bugs that I need to work out, but I feel that I should
  290. '' check what I have now.
  291. '' 
  292. ''    Rev 1.84   02 Jun 1995 14:51:06   tveerapp
  293. '' Changed IDC_HELP to IDC_CITHELP.
  294. '' 
  295. ''    Rev 1.83   01 Jun 1995 11:10:44   amontalv
  296. '' Added API function CreateLink to create shortcuts.  Also added functions
  297. '' to save and get the link path to support the CreateLink.  I also changed
  298. '' the startup program folder code to use the default dialog proc and changed
  299. '' the default dialog proc to process directory trees.
  300. '' 
  301. ''    Rev 1.82   30 May 1995 15:03:40   amontalv
  302. '' Needed to lower case drive letter before looking for cost.
  303. '' 
  304. ''    Rev 1.81   25 May 1995 20:54:56   amontalv
  305. '' Added Win95 Program folder dialog and supporting code.  Still need to write code
  306. '' that creates the link files.
  307. '' 
  308. ''    Rev 1.80   22 May 1995 19:19:06   mzgripce
  309. '' delete print messages 
  310. '' 
  311. ''    Rev 1.79   21 May 1995 17:21:28   mzgripce
  312. '' display the DB_SIZEOFINSTALL# depending on components support and
  313. '' set the components symbol when SIZEOFINSTALLCB runs
  314. '' 
  315. ''    Rev 1.78   20 May 1995 20:11:12   glutz
  316. '' Added UNC and Browse to DISTSIZEOFINSTALLCB and NODENODEOPTIONSCB
  317. '' 
  318. ''    Rev 1.77   19 May 1995 18:20:26   glutz
  319. '' SIZEOFINSTALLCD now supports Browse and UNC in multiple
  320. '' Combo and Edit controls
  321. '' 
  322. ''    Rev 1.76   19 May 1995 14:58:48   glutz
  323. '' Added UNC and Browse to PARENTDIRCB
  324. '' 
  325. ''    Rev 1.75   18 May 1995 12:11:26   tveerapp
  326. '' Fixed a Numdirs% in sizeofinstallcb
  327. '' 
  328. ''    Rev 1.74   18 May 1995 12:05:24   tveerapp
  329. '' 1. Added call to SetTheComponentsDir to PARENTDIRCB.
  330. '' 2. Fixed SIZEOFINSTALLCB added check for extra directory.
  331. '' 
  332. ''    Rev 1.73   17 May 1995 15:11:44   mzgripce
  333. '' change >= with > in GetListLength in SIZEOFINSTALLCB 
  334. '' 
  335. ''    Rev 1.72   16 May 1995 17:09:32   glutz
  336. '' Changed USE to AUTOMATE
  337. '' 
  338. ''    Rev 1.71   16 May 1995 12:53:00   mzgripce
  339. '' added PARENTDIRCB subroutine
  340. '' 
  341. ''    Rev 1.70   16 May 1995 11:57:50   glutz
  342. '' Added UNC paths to CHANGEPRODUCTDIRCB, SIZEOFINSTALLCB and SetCustomInfo
  343. '' 
  344. ''    Rev 1.69   16 May 1995 09:47:54   pdonahue
  345. '' fixed typo
  346. '' 
  347. ''    Rev 1.68   16 May 1995 09:39:04   pdonahue
  348. '' added support for additional directories.
  349. '' 
  350. ''    Rev 1.67   03 May 1995 13:04:58   amontalv
  351. '' Upped the number of tabs from 8 to 9.
  352. '' 
  353. ''    Rev 1.66   02 May 1995 12:52:30   cmoy
  354. '' Merged c2 into cf build
  355. '' 
  356. ''    Rev 1.68   18 Apr 1995 17:31:04   mheerman
  357. '' SetFocus now returns a long.  I changed the variables which catch its
  358. '' return value to long to avoid an overflow.
  359. '' 
  360. ''    Rev 1.67   11 Apr 1995 14:23:02   amontalv
  361. '' Deleted debug print
  362. '' 
  363. ''    Rev 1.66   07 Apr 1995 19:35:44   amontalv
  364. '' LSS 32 bit port merge changes.
  365. '' 
  366. ''    Rev 1.65   06 Apr 1995 17:43:28   tveerapp
  367. '' Script port changes to CBs and Window calls.
  368. '' 
  369. ''    Rev 1.64   05 Apr 1995 20:21:18   amontalv
  370. '' Porting to 32 bit.
  371. '' 
  372. ''    Rev 1.63   02 Feb 1995 14:32:40   cmoy
  373. '' 
  374. '' Added Thangaraj's fix to Pipeline Problem
  375. '' 
  376. ''    Rev 1.62   29 Dec 1994 10:31:08   tveerapp
  377. '' 
  378. '' Commented out the Restart processing (IDC_CONTINUE) in INSTALLCOMPLETECB.
  379. '' 
  380. ''    Rev 1.61   09 Dec 1994 14:38:38   cmoy
  381. '' No change.
  382. '' 
  383. ''    Rev 1.60   06 Dec 1994 09:48:00   cmoy
  384. '' No change.
  385. '' 
  386. ''    Rev 1.59   18 Nov 1994 16:12:56   amontalv
  387. '' Japan DBCS: Added some resources to
  388. '' 
  389. ''    Rev 1.58   14 Oct 1994 11:40:12   tveerapp
  390. '' Fixed spr#1022903. The fix is in SRVNODEOPTIONSCB.
  391. '' 
  392. ''    Rev 1.57   11 Oct 1994 15:21:20   tveerapp
  393. '' 
  394. '' Added check to see if the prod. was not deselected to account
  395. '' for the min. and max size in SIZEOFINSTALLCB. This fixes spr#
  396. '' 32162.
  397. '' 
  398. ''    Rev 1.56   30 Sep 1994 14:48:20   cmoy
  399. '' Added InvChar("(") to the list of invalid chars.
  400. '' 
  401. ''    Rev 1.55   27 Sep 1994 14:07:44   cmoy
  402. '' 
  403. '' Changed find window inside INSTALLCOMPLETECB to use resourced
  404. '' string SID_INST_WINDOW_TITLE
  405. '' the WndTitle field in install.lst must match this field for reboot
  406. '' and restart functionality to work properly.
  407. '' 
  408. ''    Rev 1.54   27 Sep 1994 13:06:22   cmoy
  409. '' 
  410. '' moved rebooting and restarting constants to toolkit.lss
  411. '' 
  412. ''    Rev 1.53   26 Sep 1994 16:30:00   cmoy
  413. '' 
  414. '' Added Constant UM_RESTARTWINDOWS=1528
  415. '' 
  416. ''    Rev 1.52   16 Sep 1994 11:53:34   tveerapp
  417. '' Changed ProgmanCB. failed% =1. This change should have been made with
  418. '' the previous change.
  419. '' 
  420. ''    Rev 1.51   15 Sep 1994 16:17:14   tveerapp
  421. '' Changed ProgmangroupCb to accept characters that can be allowed to create
  422. '' program groups. InvChar is now a list.
  423. '' 
  424. ''    Rev 1.50   25 Aug 1994 16:46:22   mzgripce
  425. '' Gray out the Change Path button for win and winsys dir 
  426. '' 
  427. ''    Rev 1.49   02 Aug 1994 16:46:52   mzgripce
  428. '' put a check for Lot_IsTheNodeOptionsAvailtoNode() bfore turning 
  429. '' the options on in NODENODEOPTIONSCB
  430. '' 
  431. ''    Rev 1.48   24 Jun 1994 11:30:08   thangv
  432. '' Reverted back to using the old value (fixedin lcb.c by james) of
  433. '' Lot_LCBGetItem(..LCBITEM_SELECTED) in SRVNODEOPTIONSCB. The change was in
  434. '' line 1991 and 1999 in the check for the Selection% variable.
  435. '' 
  436. ''    Rev 1.47   21 Jun 1994 13:00:18   thangv
  437. '' Added code(lines 2010 and 2011) to get the groups chapter$. This was not
  438. '' having the right chapter number(had only the options for the group).This
  439. '' should fix the tip not showing up.(spr# 30277).
  440. '' 
  441. ''    Rev 1.46   21 Jun 1994 10:41:20   thangv
  442. '' Added code to CHANGEPRODUCTDIRCB (981-985) to restore the original
  443. '' value of the path if the product group rejects the path in their
  444. '' PathCahnge function.
  445. '' 
  446. ''    Rev 1.45   20 Jun 1994 14:49:36   thangv
  447. '' Changed the value of Selection% being checked in line 1970,1978 in
  448. '' SRVNODEOPTIONSCB to fix spr#31525. Lot_LCBGetItem returns the present state
  449. '' and not after the checkbox has been refreshed.
  450. '' 
  451. ''    Rev 1.44   16 Jun 1994 10:16:42   thangv
  452. '' 
  453. '' Added code to ungrey IDC_TEXT4 andIDC_TEXT5 in SIZEOFINSTALLCB,
  454. '' lines 1249 and 1250 to fix the bug for organizer(product with only full
  455. '' install and lotusapp support).
  456. '' 
  457. ''    Rev 1.43   08 Jun 1994 17:19:26   thangv
  458. '' The NODENODEOPTIONSCB was not calling the pathchange function for
  459. '' the products. Added the Lot_CallOneProd... function in the callback.
  460. '' This fixes Amipro's problem.
  461. '' 
  462. ''    Rev 1.42   06 Jun 1994 14:09:04   cmoy
  463. '' In SetCustomInfo refreshed the drive space available box more often.
  464. '' 
  465. ''    Rev 1.41   05 Jun 1994 20:11:46   ptilton
  466. '' Added calls to update OracleHomeDir and NotesDataDir Symbols in copylist
  467. '' 
  468. ''    Rev 1.40   02 Jun 1994 12:49:04   thangv
  469. '' 
  470. '' Removed an extra , in line 1759.
  471. '' 
  472. ''    Rev 1.39   02 Jun 1994 12:43:38   thangv
  473. '' 
  474. '' Added TrimNetlotusapp code to NODELOTUSAPPCB.
  475. '' 
  476. ''    Rev 1.38   01 Jun 1994 16:54:36   mmeth
  477. '' Check The return code from change path, and don't bring down the
  478. '' dialog, if the calling function returns gBACK
  479. '' 
  480. ''    Rev 1.37   26 May 1994 17:14:12   thangv
  481. '' 
  482. '' Added a check to ungrey IDC_TEXT3 in SIZEOFINSTALLCB for a simple
  483. '' product (like organizer) that supports only full install.
  484. '' 
  485. ''    Rev 1.36   25 May 1994 14:32:46   cmoy
  486. '' 
  487. '' removed rebooting feature instead a msg is sent to install.c
  488. '' 
  489. ''    Rev 1.35   18 May 1994 14:56:34   tingmann
  490. '' add SetYieldActive calls around lcb handling
  491. '' 
  492. ''    Rev 1.34   09 May 1994 15:11:36   ddupre
  493. '' Moved RegisterCallback call inside while loop in Custom1cb subroutine. JG
  494. '' 
  495. ''    Rev 1.33   06 May 1994 14:17:56   mzgripce
  496. '' 
  497. '' change progmancb to work for server
  498. '' 
  499. ''    Rev 1.32   06 May 1994 08:32:38   ddupre
  500. '' Added Lot_LCBSetSel to the SRVNODEOPTIONSCB SUB to select the first lb item
  501. '' 
  502. ''    Rev 1.31   05 May 1994 15:42:50   thangv
  503. '' Fixed the problem with the size of installcb not putting
  504. '' the correct focus on the radio button.
  505. '' 
  506. ''    Rev 1.30   05 May 1994 15:35:22   mzgripce
  507. '' fixed spr #28876
  508. '' 
  509. ''    Rev 1.29   02 May 1994 13:55:26   mmeth
  510. '' Jame's fix for set focus
  511. '' 
  512. ''    Rev 1.27   26 Apr 1994 18:33:14   mzgripce
  513. '' fixed spr 28121
  514. '' 
  515. ''    Rev 1.26   15 Apr 1994 13:15:06   mmeth
  516. '' added space between notepad.exe and readme.txt
  517. '' 
  518. ''    Rev 1.25   13 Apr 1994 14:07:22   cmoy
  519. '' 
  520. '' Modified callbacks to unbold text.
  521. '' 
  522. ''    Rev 1.24   13 Apr 1994 12:40:20   thangv
  523. '' Removed the extra `character in line 2010.
  524. '' 
  525. ''    Rev 1.23   13 Apr 1994 09:24:02   cmoy
  526. '' Added AUTOEXECCB and INSTALLCOMPLETECB
  527. '' 
  528. ''    Rev 1.22   12 Apr 1994 16:51:10   thangv
  529. '' Changed SIZEOFINSTALLCB: Removed the truncation of lotusapp
  530. '' in the display.Now lotusapp will be displayed.(lines 1033,1034 old
  531. '' code.). Fixed the bug.
  532. '' 
  533. ''    Rev 1.21   31 Mar 1994 10:30:38   thangv
  534. '' 
  535. '' Size of Install Callback for a single product with no lotusapp
  536. '' was trying to validate lotusappdir. put the check to see if the
  537. '' product supported share. fixed it.
  538. '' 
  539. ''    Rev 1.20   28 Mar 1994 17:10:02   thangv
  540. '' 
  541. '' resourced Notepad.exe and readnet.txt to SID_NOTEPADEXE and
  542. '' SID_READNETTXT
  543. '' 
  544. ''    Rev 1.19   28 Mar 1994 15:39:46   mzgripce
  545. '' change SIZEOFINSTALLCB to not add lotusapp word to the lotusapp directory for
  546. '' server
  547. '' 
  548. ''    Rev 1.18   28 Mar 1994 14:29:08   mmeth
  549. '' Changes with Christopher, obsoleteing dialosg
  550. '' 
  551. ''    Rev 1.17   28 Mar 1994 10:01:12   mmeth
  552. '' Greying out Change Directory Boutton for Shared Components
  553. '' 
  554. ''    Rev 1.16   25 Mar 1994 14:14:12   mzgripce
  555. '' added getlotusappdircb
  556. '' 
  557. ''    Rev 1.15   15 Mar 1994 12:30:18   jbrodeur
  558. '' Fix Node Inst Error
  559. '' 
  560. ''    Rev 1.14   11 Mar 1994 17:07:26   thangv
  561. '' 
  562. '' Set the SYM_NETWORK symbol to gDISTRIBUTION and checked
  563. '' to incorporate this WELCOMECB
  564. '' 
  565. ''    Rev 1.13   08 Mar 1994 14:47:22   mmeth
  566. '' 
  567. '' Hide the path button in custom1cb
  568. '' 
  569. ''    Rev 1.12   08 Mar 1994 14:35:14   mzgripce
  570. '' move ResetWinWinsys... call out of single prod if in SIZEOFINSTALLCB
  571. '' 
  572. ''    Rev 1.11   08 Mar 1994 10:55:28   mmeth
  573. '' fixed the Welcome Box
  574. '' 
  575. ''    Rev 1.10   07 Mar 1994 18:08:38   cmoy
  576. '' Added DISTSIZEINSTALLCB callback
  577. '' 
  578. ''    Rev 1.9   07 Mar 1994 17:56:04   mzgripce
  579. '' make resetWinWinsys SUB public
  580. '' 
  581. ''    Rev 1.8   07 Mar 1994 15:31:12   mzgripce
  582. '' fixed NODENODEDEOPTIONSCB
  583. '' 
  584. ''    Rev 1.7   02 Mar 1994 09:18:14   mzgripce
  585. '' Fixed SRVNODEOPTIONSCB using Reg_ReSet... and counting for customize
  586. '' 
  587. ''    Rev 1.6   01 Mar 1994 11:29:46   mmeth
  588. '' Fixed misspelling in SYM_SMARTSUITE....
  589. '' 
  590. ''    Rev 1.5   01 Mar 1994 10:33:06   mmeth
  591. '' ELSE IF --> ELSEIF
  592. '' 
  593. ''    Rev 1.4   28 Feb 1994 17:21:10   cmoy
  594. '' Added DB_SIZEOFINSTALL6 & 7 for server and standard
  595. '' installs in Lot_GetSizeofInstall
  596. '' 
  597. ''    Rev 1.3   25 Feb 1994 18:37:12   mzgripce
  598. '' add Lot_SetSpaceDirTip(), SRVNODEOPTIONSCB AND NODENODEOPTIONSCB
  599. '' 
  600. ''    Rev 1.2   18 Feb 1994 13:29:52   mmeth
  601. '' 
  602. '' Now check for Listlength of Reg_GetDirSymbolList
  603. '' 
  604. ''    Rev 1.1   15 Feb 1994 15:01:50   mmeth
  605. '' added pvcs line for toolkit.lss &
  606. '' 
  607. ''    Rev 1.0   11 Feb 1994 10:56:22   jbrodeur
  608. '' Initial Revision
  609. ''----------------------------------------------------------------------
  610. ''   Date     Vers. Pgmr  SPR#  Change
  611. ''----------------------------------------------------------------------
  612. '' 02-04-94   0018  MMETH      changed characters allowed in progrmangroup
  613. '' 02-04-94   0017  MMETH      SIZEOFINSTALLCB now support distribtuin dialog also
  614. ''!
  615. '' 02-01-94   0016  MZ         Added PROGMANGROUPCB
  616. '' 02-02-94   0015  MMETH      added NODELOTUSAPP stuff
  617. '' 01-24-94   0014  TQI        Capture all function returns (lsi36)
  618. '' 01-21-94   0013  DND         Custom2 shows the tips in normal text.
  619. '' 01-21-94   0012  MZ          Add SRV_SUCCESSCB
  620. '' 01-21-94   0011  MMETH       Added gNext parm to Lot_Call1Product
  621. '' 01-21-94   0010  DND         The path change dialogs now work correctly
  622. ''                              for server.
  623. '' 01-20-94   0009  DND         SIZEOFINSTALL should work for SmartSuite.
  624. ''                              Call the PathChange callbacks
  625. '' 01-19-94   0008  DND         Finish SINGLESIZEOFINSTALLCB. Added
  626. ''                              Lot_GetSizeOfInstall
  627. '' 01-19-94   0007  MMeth       Move SYM_UPDATELIST$ abd SYM_NORMALFONT
  628. '' 01-13-94   0006  DND         Add ability to change the currently shown
  629. ''                              path. Removed CHNGPATHBASE, PROGRAMPATHCB,
  630. ''                              Lot_DetectVersionPriorToDarwinA,
  631. ''                              PathChange123A, Lot_CheckProductDirs.
  632. '' 01-12-94   0005  DND         The custom dialogs now show the path
  633. ''                              based on what LCB item is selected.
  634. ''                              IN PROCESS
  635. '' 01-12-94   0004  MMETH       Changed Return code of CallProd to string
  636. '' 01-12-94   0003  MMETH       Commented out call to PathChang123A
  637. '' 01-11-94   0002  TQI         Option declare
  638. '' 01-10-94   0001  MZ          Make all symbols Constants and put them
  639. ''                              in GLOBALS.LSS
  640. '' 01-05-94   0000  DND         Initial checkin
  641. ''----------------------------------------------------------------------
  642. ''
  643. ''**********************************************************************
  644.  
  645. USE "AUTOMATE"
  646. OPTION DECLARE
  647.  
  648. '** Constants ----------------------------------------------------------
  649.  
  650.  
  651. CONST MAX_PAGES          = 9     '** Match LT_MAXPAGES from notebook.h
  652. CONST LCBITEM_ENTIRE     = 0
  653. CONST LCBITEM_SELECTED   = 1
  654. CONST LCBITEM_TEXT       = 2
  655. CONST LCBITEM_SIZE       = 3
  656. CONST LCBITEM_CHAPTER    = 4
  657.  
  658. CONST SYM_CUSTOMCOST$    = "CustomCostList"  '** Use only in this module
  659.  
  660. CONST UM_SETBITMAP       = WM_USER+100
  661.  
  662. '** Module globals -----------------------------------------------------
  663.  
  664. '** Structure to contain static information of a page (Custom)
  665. TYPE PAGEINFO
  666.    szChapter AS STRING     '** Chapter that started the page
  667.    idPage    AS INTEGER    '** Page ID
  668.    hDlgPage  AS LONG       '** Page dialog handle
  669.    nSel      AS INTEGER    '** Current Selection in page
  670. END TYPE
  671.  
  672. '** These module globals are used for CUSTOM1 and CUSTOM2
  673. DIM ghdlg&                             '** Save the parent dialog
  674. DIM gCurrentPageIndex%                 '** The current page index (into array)
  675. DIM gNumPages%                         '** Number of pages in gPageArray
  676. DIM gPageArray(MAX_PAGES) AS PAGEINFO  '** Page info for up to 8 pages
  677. '** Folder
  678. DIM gEntered$
  679. '** Focus problems
  680. DIM gPrevInst%
  681.  
  682. '** Declares -----------------------------------------------------------
  683.  
  684. DECLARE PUBLIC FUNCTION Lot_ConfirmNamesDlg  () AS STRING
  685. DECLARE PUBLIC FUNCTION Lot_GetSizeOfInstall () AS STRING
  686. DECLARE PUBLIC SUB      ResetWinWinsysSymbols()
  687.  
  688. DECLARE SUB      SetCustomInfo(fOnTab%,fNewSpace%,fUpdateAll%)
  689. DECLARE FUNCTION DoesFileExistInDir (dirlist$) AS INTEGER
  690. DECLARE SUB      Lot_SetSpaceDirTip(hDlg&,chpt$,index%,ProdNum%,tiponly%)
  691.  
  692. '*************************************************************************
  693. '************************* Public Functions ******************************
  694. '*************************************************************************
  695.  
  696. '*************************************************************************
  697. '** PUBLIC FUNCTION Lot_ConfirmNamesDlg () AS STRING
  698. '** Purpose:   This function puts up the DB_CONFIRMNAME dlg box.
  699. '**     
  700. '**     
  701. '** Author:
  702. '** Arguments:
  703. '**     
  704. '** Returns:
  705. '**     
  706. '*************************************************************************
  707.  
  708. PUBLIC FUNCTION Lot_ConfirmNamesDlg () AS STRING
  709.  
  710.    AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
  711.    AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
  712.    AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  713.     
  714.    SetListItem "IDC_TEXT", 1, GetSymbolValue(SYM_NAME$)
  715.    SetListItem "IDC_TEXT", 2, GetSymbolValue(SYM_COMPANY$)
  716.  
  717.    Lot_ConfirmNamesDlg = PopupModalDlg (DB_CONFIRMNAMES, DB_CONFIRMNAMES)
  718.  
  719. END FUNCTION
  720.  
  721. '*************************************************************************
  722. '** PUBLIC FUNCTION Lot_GetSizeOfInstall () AS STRING
  723. '** Purpose:   Bring up the appropriate size dialog. When this dialog
  724. '**            comes in, all products are set to the value in
  725. '**            SYM_SIZEOFINSTALL$. Before leaving all products are
  726. '**            set again to the value in SYM_SIZEOFINSTALL$
  727. '**     
  728. '** Author: DND
  729. '** Arguments:
  730. '** Symbols:   SYM_SIZEOFINSTALL$ - The default install type. Reset
  731. '**                                 to the selected when done.
  732. '**     
  733. '** Returns: Value from PopupModalDlg
  734. '**     
  735. '*************************************************************************
  736. PUBLIC FUNCTION Lot_GetSizeOfInstall () AS STRING
  737.  
  738.    DIM   IdDlg%, i%, nProds%, network$, size$, notused%, NumDirs%
  739.  
  740.    '** Set all the applications to start with the default
  741.    size$   = GetSymbolValue(SYM_SIZEOFINSTALL$)
  742.    nProds% = Reg_GetNumberOfProducts()
  743.    FOR i% = 1 to nProds%
  744.       Reg_SetSelectedInstallType i%, size$
  745.    NEXT
  746.  
  747.    '** Bring up the size of install dialog
  748.    network$ = GetSymbolValue(SYM_NETWORK$)
  749.  
  750.    NumDirs% = Reg_GetProdSupportForExtraProdDirs(1)
  751.  
  752.  IF NumDirs < 1 Then
  753.    IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  754.       '** Check for the case where the product only does full install
  755.       IF Reg_GetProdSupportForFullInstall(1) <> FALSE AND _
  756.      Reg_GetProdSupportForMinInstall (1) =  FALSE AND _
  757.      Reg_GetProdSupportForCustInstall(1) =  FALSE THEN
  758.      '** This product only allows full install. If server then
  759.      '** Ask for two paths. If not, then ask for one.
  760.      IF network$ = gSERVER$ THEN
  761.     IF Reg_GetProdSupportForShare32(1) <> FALSE Then
  762.        IdDlg% = DB_SIZEOFINSTALL2
  763.     ELSE
  764.        IdDlg% = DB_SIZEOFINSTALL1
  765.     END IF
  766.  
  767.      ELSE
  768.     IdDlg% = DB_SIZEOFINSTALL1
  769.      END IF
  770.       ELSEIF network$ = gSERVER$ THEN
  771.  
  772.      '** For server, only Full and Custom are allowed. Both the
  773.      '** main path and lotusapp are asked for
  774.      IF Reg_GetProdSupportForShare32(1) <> FALSE Then
  775.     IdDlg% = DB_SIZEOFINSTALL3
  776.      ELSE
  777.     IdDlg% = DB_SIZEOFINSTALL5
  778.      END IF
  779.  
  780.       ELSE
  781.  
  782.      '** Use the dialog with three choices and choices are grayed.
  783.      '** Only the main path is asked for.
  784.      IdDlg% = DB_SIZEOFINSTALL4
  785.  
  786.       END IF
  787.  
  788.     '** SmartSuite
  789.    ELSEIF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  790.  
  791.     IF network$ = gSERVER$ THEN
  792.         IdDlg% = DB_SIZEOFINSTALL6 '** server
  793.     ELSE
  794.         IdDlg% = DB_SIZEOFINSTALL7 '** standard or node
  795.     END IF
  796.  
  797.     ELSE
  798.       '** TEMPORARY ???MMETH
  799.       IdDlg% = DB_SIZEOFINSTALL4
  800.  
  801.    END IF
  802.  
  803.  ELSE
  804.  
  805.    IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  806.  
  807.       '** Check for the case where the product only does full install
  808.       IF Reg_GetProdSupportForFullInstall(1) <> FALSE AND _
  809.      Reg_GetProdSupportForMinInstall (1) =  FALSE AND _
  810.      Reg_GetProdSupportForCustInstall(1) =  FALSE THEN
  811.  
  812.      '** This product only allows full install. If server then
  813.      '** Ask for two paths. If not, then ask for one.
  814.  
  815.      IF network$ = gSERVER$ THEN
  816.     IF Reg_GetProdSupportForShare32(1) <> FALSE Then
  817.        IdDlg% = DB_SIZEOFINSTALL9
  818.     ELSE
  819.        IdDlg% = DB_SIZEOFINSTALL8
  820.     END IF
  821.      ELSE
  822.     IdDlg% = DB_SIZEOFINSTALL8
  823.      END IF
  824.  
  825.       ELSEIF network$ = gSERVER$ THEN
  826.  
  827.      '** For server, only Full and Custom are allowed. Both the
  828.      '** main path and lotusapp are asked for
  829.      IF Reg_GetProdSupportForShare32(1) <> FALSE Then
  830.     IdDlg% = DB_SIZEOFINSTALL10
  831.      ELSE
  832.     IdDlg% = DB_SIZEOFINSTALL12
  833.      END IF
  834.  
  835.       ELSE
  836.  
  837.      '** Use the dialog with three choices and choices are grayed.
  838.      '** Only the main path is asked for.
  839.      IdDlg% = DB_SIZEOFINSTALL11
  840.  
  841.       END IF
  842.  
  843.     '** SmartSuite
  844.    ELSEIF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  845.     IF network$ = gSERVER$ THEN
  846.         IdDlg% = DB_SIZEOFINSTALL6 '** server
  847.     ELSE
  848.         IdDlg% = DB_SIZEOFINSTALL7 '** standard or node
  849.     END IF
  850.  
  851.     ELSE
  852.       '** TEMPORARY ???MMETH
  853.       IdDlg% = DB_SIZEOFINSTALL11
  854.      END IF
  855.  
  856.  END IF
  857.  
  858.    '** Ask the user for the selected size
  859.    notused% = RegisterCallback("CALLBACK", "SIZEOFINSTALLCB")
  860.    Lot_GetSizeOfInstall = PopupModalDlg (IdDlg%, CLNG(IdDlg%))
  861.  
  862.    '** Reset all the sizes
  863.    size$ = GetSymbolValue(SYM_SIZEOFINSTALL$)
  864.    FOR i% = 1 to nProds%
  865.       Reg_SetSelectedInstallType i%, size$
  866.    NEXT
  867.  
  868. END FUNCTION
  869.  
  870. '*************************************************************************
  871. '** PUBLIC FUNCTION GetGroupName () AS STRING
  872. '** Purpose:   Get the group name from the dialog and verify it.
  873. '**     
  874. '** Author: 
  875. '** Arguments:
  876. '**        fDisplayErr%        - TRUE if the error needs to be displayed.
  877. '** Symbols:   
  878. '**     
  879. '** Returns: Program Group Name
  880. '**     
  881. '*************************************************************************
  882. FUNCTION GetGroupName () AS STRING
  883.     DIM count%, charlen%, failed%, inloopset%
  884.     DIM CheckName$, targetstr$, EnteredName$
  885.  
  886.    DIM InvChar LIST AS STRING
  887.    
  888. ''** HISHI - Aug/23/95
  889.    IF LENBP(GetListItem ("IDC_EDIT", 1)) < 254 THEN
  890.         EnteredName$=GetListItem("IDC_EDIT",1)
  891.    ELSE
  892.         targetstr$ = GetListItem ("IDC_EDIT", 1)
  893.  
  894.         IF IsDBCSFirstAtOffset (targetstr$, 254) = 1 THEN
  895. ''** HISHI - Aug/23/95
  896.             EnteredName$=LEFTBP(GetListItem ("IDC_EDIT", 1), 253)
  897.         ELSE
  898. ''** HISHI - Aug/23/95
  899.             EnteredName$=LEFTBP(GetListItem ("IDC_EDIT", 1), 254)
  900.         END IF
  901.     END IF
  902.  
  903.     IF EnteredName$ = "" AND NOT IsNewShell() THEN
  904.        EnteredName$=Reg_GetProgManagerGroupName(1)
  905.     END IF
  906.  
  907.     
  908.    InvChar("\") = "1"
  909.    InvChar("/") = "1"
  910.    InvChar("<") = "1"
  911.    InvChar(">") = "1"
  912.    InvChar("*") = "1"
  913.    InvChar("?") = "1"
  914.    InvChar(|"|) = "1"
  915.    InvChar("|") = "1"
  916.    InvChar(":") = "1"
  917.  
  918.    failed% = 0
  919.  
  920.    IF IsNewShell() THEN
  921.       ' Look for invalid char.  Fail if any are invalid
  922.  
  923.       CheckName$ = EnteredName$  
  924.       FOR count% = 1 TO LEN(EnteredName$)
  925. ''** HISHI - Aug/01/95
  926. ''         charlen% = FDBCSCharLen(CheckName$,0)
  927.          IF ISELEMENT(InvChar(LEFT$(CheckName$,1))) = TRUE THEN
  928.                 failed% = 1
  929.                 EXIT FOR
  930.              END IF 
  931. ''             count% = count% + charlen% - 1
  932.          CheckName$ = RIGHT$(Checkname$,LEN(CheckName$)-1)
  933. ''** END HISHI
  934.       NEXT
  935.  
  936.       InvChar(" ") = "1"
  937.    END IF
  938.  
  939.    IF NOT IsNewShell() THEN
  940.      InvChar("+") = "1"
  941.      InvChar("=") = "1"
  942.      InvChar("[") = "1"
  943.      InvChar("]") = "1"
  944.      InvChar(";") = "1"
  945.      InvChar(",") = "1"
  946.      InvChar(")") = "1"
  947.      InvChar("(") = "1"
  948.      InvChar(".") = "1"  '* MMETH; I believe that this is a valid character
  949.  
  950.      'TV: These are also invalid characters.
  951.      InvChar("'") = "1" 
  952.      InvChar("@") = "1" 
  953.      InvChar("{") = "1" 
  954.      InvChar("}") = "1" 
  955.      InvChar("#") = "1" 
  956.      InvChar("%") = "1" 
  957.      InvChar("!") = "1" 
  958.      InvChar("`") = "1" 
  959.      InvChar("$") = "1" 
  960.      InvChar("^") = "1" 
  961.      InvChar("~") = "1" 
  962.      InvChar("-") = "1" 
  963.      InvChar("_") = "1" 
  964.      InvChar("&") = "1" 
  965.    END IF
  966.  
  967.    IF failed% = 0 THEN
  968.       failed% = 1
  969.  
  970.       ' Validate the name if it is a new one
  971.       ' The ilegal characters in the name are:
  972.       ' * + | : " < > ? + { } \ ; ,  /  MMETH removed the period
  973.       ' if the path consists only of " then the group name will be )]
  974.       ' if the path consists only of ) or ] or , the group is not created
  975.  
  976.       '** TV: Reject only if the group name consists entirely of Invalid 
  977.       '**characters
  978.       CheckName$ = EnteredName$  
  979.       FOR count% = 1 TO LEN(EnteredName$)
  980. ''** HISHI - Aug/01/95
  981. ''         charlen% = FDBCSCharLen(CheckName$,0)
  982.          IF ISELEMENT(InvChar(LEFT$(CheckName$,1))) = FALSE THEN
  983.             failed% = 0
  984.             EXIT FOR
  985.          END IF 
  986. ''         count% = count% + charlen% - 1
  987.          CheckName$ = RIGHT$(Checkname$,LEN(CheckName$)-1)
  988. ''** END HISHI
  989.       NEXT
  990.    END IF
  991.  
  992.    '*** TV: The " character cannot be permitted.
  993.    '** This breaks the script execution later!!
  994.    IF INSTR(1,EnteredName$,|"|) <> 0 THEN
  995.       failed% = 1
  996.    END IF 
  997.  
  998.  
  999.  IF IsNewShell() THEN
  1000.    IF failed% <> 0 THEN
  1001.       ShowPathErrorNoDlgExit SID_ERR_INVALIDFOLDERNAME,SID_ERR_INVALIDFOLDERNAMEDESC95,EnteredName$
  1002.       GetGroupName = ""
  1003.    ELSE
  1004.       GetGroupName = EnteredName$
  1005.    END IF
  1006.  ELSE   
  1007.    IF failed% <> 0 THEN
  1008.        ShowPathErrorNoDlgExit SID_ERR_INVALIDGROUPNAME,SID_ERR_INVALIDGROUPNAMEDESC,EnteredName$
  1009.       GetGroupName = ""
  1010.    ELSE
  1011.       GetGroupName = EnteredName$
  1012.    END IF
  1013.  END IF
  1014.  
  1015. END FUNCTION
  1016.  
  1017. '*************************************************************************
  1018. '************************* Callbacks *************************************
  1019. '*************************************************************************
  1020. '*************************************************************************
  1021. '** PROGMANGROUPCB
  1022. '** Purpose:    This is a for the Program Group selection
  1023. '** IN SYMBOLS  
  1024. '**     
  1025. '** Author:
  1026. '** Arguments:
  1027. '**     
  1028. '**     
  1029. '** Returns:
  1030. '**     
  1031. '*************************************************************************
  1032. SUB PROGMANGROUPCB (hDlg&, CtrlId%, Classes$, LInst&)
  1033.    DIM ProgManIni$, Group$, GroupId%, Index%,notused%,DefaultGroup$
  1034.    DIM EnteredName$,order%,RootFolder$
  1035.    DIM Inst%
  1036.  
  1037.    ' *** script port to win32
  1038.    Inst% = CINT(LInst&) 
  1039.  
  1040.    SELECT CASE Classes$
  1041.  
  1042.    CASE "__DLGINIT"
  1043.  
  1044.     AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  1045.     AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  1046.  
  1047.     IF NOT IsNewShell() THEN
  1048.     ProgManIni$=GetWindowsDir()+"progman.ini"
  1049.     END IF
  1050.     DefaultGroup$=Reg_GetProgManagerGroupName(1)
  1051.     IF DefaultGroup$="" THEN
  1052.        DefaultGroup$=LdString(SID_TKT_DEF_PROGMANGRP)
  1053.     END IF
  1054.  
  1055.     SetListItem "IDC_EDIT", 1, DefaultGroup$
  1056.     IF IsNewShell() THEN
  1057.     SetListItem "IDC_TREE",1, Reg_GetSelectedFolder(1)
  1058.     AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1059.     AddListItem SYM_UPDATELIST$, "IDC_TREE"
  1060.     AddListItem SYM_UPDATELIST$, "IDC_B1"
  1061.     AddListItem SYM_UPDATELIST$, "IDC_B2"
  1062.     AddListItem SYM_UPDATELIST$, "IDC_B3"
  1063.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B1), TRUE))
  1064.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B2), FALSE))
  1065.     ELSE
  1066.     if (GetListLength("IDC_LIST1") > 1) THEN
  1067.         RemoveSymbol("IDC_LIST1")
  1068.     END IF
  1069.     SetListItem "IDC_LIST1",1, DefaultGroup$
  1070.     notused% = CInt(FAddProgramGroupsToList(HKEY_LOCAL_MACHINE&, gPROGMANREGNAME, "IDC_LIST1", DefaultGroup$))
  1071.     AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1072.     AddListItem SYM_UPDATELIST$, "IDC_LIST1"
  1073.     END IF
  1074.  
  1075.    CASE "IDC_EDIT"
  1076.     IF IsNewShell() THEN
  1077.           IF GetFocus() = GetDlgItem(hDlg, IDC_EDIT1) THEN
  1078.             EnteredName$ = GetGroupName()
  1079.             IF EnteredName$ = "" THEN
  1080.                 notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B1), FALSE))
  1081.                 notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1082.                 SetFocus(GetDlgItem(hDlg&,IDC_EDIT1))
  1083.             ELSE
  1084.                 notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B1), TRUE))
  1085.                 notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1086.                 gEntered$=GetListItem("IDC_EDIT",1)
  1087.                 notused%=FChangeNameCurrTreeItem(hDlg&, gEntered$)
  1088.                  Reg_SetProgManagerGroup 1,gEntered
  1089.             END IF
  1090.       END IF
  1091.     END IF
  1092.  
  1093.    CASE "IDC_TREE"
  1094.         EnteredName$=GetGroupName()
  1095.         IF EnteredName$ = "" THEN
  1096.           SetListItem "__LASTSTATUS", 1, "Q"
  1097.             SetFocus(GetDlgItem(hDlg&,IDC_EDIT1))
  1098.             EXIT SUB
  1099.         END IF
  1100.  
  1101.    DISPLAYTEXT:
  1102.         EnteredName$ = GetListItem("IDC_TREE",Inst%)
  1103.         Reg_SetSelectedFolder 1,EnteredName$
  1104.           IF DoesDirExist (Reg_GetSelectedFolder(1)) THEN
  1105.             notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1), FALSE))
  1106.             notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B2), FALSE))
  1107.         ELSE
  1108.             notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1), TRUE))
  1109.             notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B2), TRUE))
  1110.         END IF
  1111.         RootFolder = Reg_GetRootFolder()
  1112.         order% = 1
  1113.         DO
  1114.           Index% = order%
  1115.           order% = InStr(Index%+1,RootFolder,"\")
  1116.         LOOP UNTIL order% = 0
  1117.         Group$ = RIGHT$(EnteredName$,LEN(EnteredName$)-Index%)
  1118.         SetListItem "IDC_TEXT",3,Group$
  1119.         AddListItem SYM_UPDATELIST$, "IDC_TEXT3"
  1120.         gEntered = GetLastPathComponent(Group$)
  1121.         SetListItem "IDC_EDIT", 1, gEntered
  1122.         AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1123.  
  1124.    CASE "IDC_LIST1"
  1125.         EnteredName$=GetListItem("IDC_LIST1",Inst%)
  1126.         SetListItem "IDC_EDIT", 1, EnteredName$
  1127.         AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1128.  
  1129.    CASE "IDC_B"
  1130.     IF CtrlId% = cIDC_B1 THEN
  1131.         IF GetSymbolValue("USEDEFAULTGRP")<>"" THEN
  1132.             EnteredName$=Reg_GetProgManagerGroupName(1)
  1133.             IF EnteredName$="" THEN
  1134.                EnteredName$=LdString(SID_TKT_DEF_PROGMANGRP)
  1135.             END IF
  1136.               RemoveSymbol("USEDEFAULTGRP")
  1137.          ELSE
  1138.             EnteredName$=LdString(SID_TKT_DEF_NEWFOLDERNAME)
  1139.         END IF
  1140.       Group$ = GetListItem("IDC_TREE",Inst%)+"\"+EnteredName$
  1141. ''** HISHI - Aug/01/95
  1142.       IF LENBP(Group$) > (MAX_DIR_PATH - 11) THEN
  1143.          '** This is only about the path length and might need a new message
  1144.             ShowPathError SID_ERR_PATHLEN, SID_ERR_PATHLEN_DESCR, _
  1145.             STR$(MAX_DIR_PATH - CINT(GetSymbolValue(SYM_DOSMAXPATHDIFF$)))+LdString(SID_ERR_PATHLEN_CHARS)
  1146.       ELSE
  1147.            Index% = 0
  1148.             DO WHILE DoesDirExist (Group$)
  1149.                Index% = Index%+1
  1150.               Group$ = GetListItem("IDC_TREE",Inst%)+"\"+EnteredName$+"("+CSTR(Index%)+")"
  1151.             LOOP
  1152.             If Index% > 0 Then
  1153.                 EnteredName$ = EnteredName$+"("+CSTR(Index%)+")"
  1154.             End If
  1155.             Reg_SetProgManagerGroup 1,EnteredName$
  1156.             notused% = FAddItemToTree(hDlg&, EnteredName$)
  1157.             SetFocus(GetDlgItem(hDlg&,IDC_EDIT1))
  1158.         END IF
  1159.     ELSEIF CtrlId% = cIDC_B1+1 THEN
  1160.         notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B1), TRUE))
  1161.         notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1162.         notused%=FDeleteCurrTreeItem(hDlg&)
  1163.         IF DoesDirExist(GetListItem("IDC_TREE",1)) THEN
  1164.             SetFocus(GetDlgItem(hDlg&,IDC_B1))
  1165.         END IF
  1166.     ELSE
  1167.         Inst% = 1
  1168.         GOTO DISPLAYTEXT
  1169.    END IF
  1170.  
  1171.    CASE "IDC_OK"
  1172.     IF IsNewShell() THEN
  1173.         Reg_SetSelectedFolder 1,GetListItem("IDC_TREE",Inst%)
  1174.     ELSE
  1175.     Reg_SetProgManagerGroup 1,GetGroupName()
  1176.     END IF
  1177.  
  1178.    CASE "IDC_BACK"
  1179.    CASE "IDC_CITHELP"
  1180.    CASE "IDC_EXIT"
  1181.  
  1182.    END SELECT   
  1183.  
  1184. END SUB
  1185.  
  1186. '*************************************************************************
  1187. '** WELCOMECB
  1188. '** Purpose:    This is a for the Welcome Dialog Boxes
  1189. '**             there are two distinct types of dialogs:
  1190. '**             A STANDARD/SERVER dialog vs a NODE dialog.
  1191. '**
  1192. '** IN SYMBOLS  NAME, COMPANY, NETWORK  
  1193. '**     
  1194. '** Author:
  1195. '** Arguments:
  1196. '**     
  1197. '**     
  1198. '** Returns:
  1199. '**     
  1200. '*************************************************************************
  1201. SUB WELCOMECB (hDlg&, CtrlId%, Classes$, LInst&)
  1202.    DIM lname$, company$, network$, i%, notused%
  1203.    DIM sz$
  1204.  
  1205.    ' Changes from Japan for DBCS        
  1206.    DIM targetstr$, Inst%
  1207.  
  1208.    Inst% = CINT(LInst&)
  1209.    ' End: Changes from Japan for DBCS   
  1210.  
  1211.    SELECT CASE Classes$
  1212.  
  1213.    CASE "__DLGINIT"
  1214.  
  1215.       '** Set the product bitmap
  1216.       SetListItem "IDC_BMP", 1, STR$(IDD_TKT_PROD_BMP)
  1217.  
  1218.       lname$   = GetSymbolValue(SYM_NAME$)
  1219.       company$ = GetSymbolValue(SYM_COMPANY$)
  1220.       SetListItem "IDC_EDIT", 1, lname$
  1221.       SetListItem "IDC_EDIT", 2, company$
  1222.  
  1223.       '** Set text to normal font
  1224.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
  1225.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT5)
  1226.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT6)
  1227.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT7)
  1228.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT8)
  1229.       AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  1230.       AddListItem SYM_UPDATELIST$, "IDC_BMP1"
  1231.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1232.       AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
  1233.  
  1234.       network$ = GetSymbolValue(SYM_NETWORK$)
  1235.       IF network$ = "" THEN
  1236.      SetSymbolValue SYM_NETWORK$, gSTANDARD$
  1237.       ELSEIF network$ = gNODE$ Then
  1238.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_EDIT2), FALSE))
  1239.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_TEXT3), FALSE))
  1240.       ELSEIF network$ = gSERVER$ OR network$ = gDISTRIBUTION$ THEN
  1241.      SetListItem "IDC_B", 1, "T"
  1242.      AddListItem SYM_UPDATELIST$, "IDC_B1"
  1243.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1), FALSE))
  1244.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_TEXT2), FALSE))
  1245.       END IF
  1246.  
  1247.       '** if userName OR companyName is empty inctivate the next button
  1248.       IF network$ = gSTANDARD$ THEN
  1249.      IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 OR _ 
  1250.     LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
  1251.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1252.      ELSE
  1253.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1254.      END IF
  1255.  
  1256.       ELSEIF network$ = gNODE$ THEN
  1257.      IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 THEN
  1258.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1259.      ELSE
  1260.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1261.      END IF
  1262.  
  1263.       ELSEIF network$ = gSERVER$ THEN
  1264.      IF LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
  1265.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1266.      ELSE
  1267.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1268.      END IF
  1269.  
  1270.       ELSE
  1271.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1272.       END IF
  1273.  
  1274.    CASE "IDC_B"
  1275.  
  1276.       If GetListItem("IDC_B",1) = "F" Then
  1277.      SetSymbolValue SYM_NETWORK$, gSTANDARD$
  1278.       Else
  1279.      '*** if both Srv and Dist are supported then Srv overrides
  1280.      If Reg_GetProdSupportForSrv(1) = 1 Then
  1281.     SetSymbolValue SYM_NETWORK$, gSERVER$
  1282.      ElseIf Reg_GetProdSupportForDist(1) = 1 Then
  1283.     SetSymbolValue SYM_NETWORK$, gDISTRIBUTION$
  1284.      End If 
  1285.       End If
  1286.  
  1287.       '** If Server checkbox is selected, grey out the User name. 
  1288.       IF IsDlgButtonChecked(hDlg&,IDC_B1) <> FALSE THEN
  1289.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1), FALSE))
  1290.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_TEXT2), FALSE))
  1291.       ELSE
  1292.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1), TRUE))
  1293.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_TEXT2), TRUE))
  1294.       END IF
  1295.  
  1296.       network$ = GetSymbolValue(SYM_NETWORK$)
  1297.       IF network$ = gSTANDARD$ THEN
  1298.      IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 OR _ 
  1299.     LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
  1300.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1301.      ELSE
  1302.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1303.      END IF
  1304.  
  1305.       ELSEIF network$ = gNODE$ THEN
  1306.      IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 THEN
  1307.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1308.      ELSE
  1309.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1310.      END IF
  1311.  
  1312.       ELSEIF network$ = gSERVER$ THEN
  1313.      IF LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
  1314.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1315.      ELSE
  1316.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1317.      END IF
  1318.  
  1319.       ELSE
  1320.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1321.       END IF
  1322.  
  1323.    CASE "IDC_EDIT"
  1324.  
  1325.       network$ = GetSymbolValue(SYM_NETWORK$)
  1326.       IF network$ = gSTANDARD$ THEN
  1327.      IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 OR _ 
  1328.     LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
  1329.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1330.      ELSE
  1331.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1332.      END IF
  1333.  
  1334.       ELSEIF network$ = gNODE$ THEN
  1335.      IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 THEN
  1336.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1337.      ELSE
  1338.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1339.      END IF
  1340.  
  1341.       ELSEIF network$ = gSERVER$ THEN
  1342.      IF LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
  1343.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1344.      ELSE
  1345.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1346.      END IF
  1347.  
  1348.       ELSE
  1349.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1350.       END IF
  1351.  
  1352.    CASE "IDC_OK"
  1353.       network$ = GetSymbolValue(SYM_NETWORK$)
  1354.       FOR i% = 1 TO 2
  1355.      IF network$ = gNODE$ AND i% = 2 THEN
  1356.     Exit For
  1357.      END IF
  1358.      IF network$ = gSERVER$ AND i% = 1 THEN
  1359.     GOTO NEXTFIELD
  1360.      END IF
  1361.  
  1362.      IF LEN(GetListItem ("IDC_EDIT", i%)) < 1 THEN
  1363.     ErrorMsgNoDlgExit SID_TKT_ERR_NEEDNAMES, ""
  1364.     EXIT FOR
  1365.       END IF
  1366.  
  1367.      NEXTFIELD:
  1368.  
  1369.       NEXT
  1370.  
  1371.      ' Changes from Japan for DBCS  
  1372.      ' This code is intimately related to code in
  1373.      ' callback.lss:Lot_ReadDefaultsfromRi &
  1374.      ' lcomstf\userreg.cpp:ReadDefaultsfromRi
  1375. ''** HISHI - Aug/29/95
  1376.      IF LENBP(GetListItem ("IDC_EDIT", 1)) < 80 THEN
  1377.          SetSymbolValue SYM_NAME$,    GetListItem ("IDC_EDIT", 1)
  1378.      ELSE
  1379.          targetstr$ = GetListItem ("IDC_EDIT", 1)
  1380.          IF IsDBCSFirstAtOffset (targetstr$, 80) = 1 THEN
  1381. ''** HISHI - Aug/29/95
  1382.             SetSymbolValue SYM_NAME$,    LEFTBP(GetListItem ("IDC_EDIT", 1), 79)
  1383.          ELSE
  1384. ''** HISHI - Aug/29/95
  1385.             SetSymbolValue SYM_NAME$,    LEFTBP(GetListItem ("IDC_EDIT", 1), 80)
  1386.          END IF
  1387.      END IF
  1388.  
  1389. ''** HISHI - Aug/29/95
  1390.      IF LENBP(GetListItem ("IDC_EDIT", 2)) < 80 THEN
  1391.          SetSymbolValue SYM_COMPANY$, GetListItem ("IDC_EDIT", 2)
  1392.      ELSE
  1393.          targetstr$ = GetListItem ("IDC_EDIT", 2)
  1394.          IF IsDBCSFirstAtOffset (targetstr$, 80) = 1 THEN ''** HISHI - Aug/14/95
  1395. ''** HISHI - Aug/29/95
  1396.            SetSymbolValue SYM_COMPANY$,    LEFTBP(GetListItem ("IDC_EDIT", 2), 79)
  1397.          ELSE
  1398. ''** HISHI - Aug/29/95
  1399.            SetSymbolValue SYM_COMPANY$,    LEFTBP(GetListItem ("IDC_EDIT", 2), 80)
  1400.      END IF
  1401.      END IF
  1402.      ' End: Changes from Japan for DBCS     
  1403.  
  1404.    '** Allow the user to exit without hitting the button
  1405.    Case "IDC_BACK"
  1406.       sz$ = PopupModalDlg (DB_EXITHISTORY, DB_EXITHISTORY)
  1407.       If sz$ = "BACK" Then
  1408.       SetListItem "__LASTSTATUS", 1, "Q"
  1409.    End If
  1410.  
  1411.    END SELECT   
  1412.  
  1413. END SUB
  1414.  
  1415. '************************************************************************
  1416. '*                   Routines to handle Custom                          *
  1417. '************************************************************************
  1418.  
  1419. '*************************************************************************
  1420. '** SUB CUSTOM1CB (hDlg&, CtrlId%, Classes$, LInst&)
  1421. '**
  1422. '** Purpose: Customize a product. This is main dialog proc. Each dialog
  1423. '**          page uses CUSTOM2CB.
  1424. '**
  1425. '**          This dialog callback can be used only once! Do not display
  1426. '**          more than one dialog at a time with this callback!
  1427. '**            
  1428. '** Author:    DND
  1429. '** Arguments: Callback args
  1430. '** Returns:   NONE
  1431. '*************************************************************************
  1432.  
  1433. SUB CUSTOM1CB (hDlg&, CtrlId%, Classes$, LInst&)
  1434.  
  1435.    DIM chpt$, product_name$, child$, dirsym$, network$
  1436.    DIM page%, tab_handle&
  1437.    DIM RC$, i%, notused%, Inst%, unused&
  1438.  
  1439.    Inst% = CINT(LInst&)
  1440.  
  1441.    SELECT CASE Classes$
  1442.  
  1443.    case "__DLGINIT"
  1444.  
  1445.       '** Set some globals
  1446.       gNumPages% = 0
  1447.       ghdlg& = hDlg&
  1448.  
  1449.       ''Display bmps with transparent background
  1450.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, "STRETCH"
  1451.  
  1452.       '** make text normal
  1453.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT6)
  1454.       AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  1455.  
  1456.       '** Hide the Path Button for a server or a language install
  1457.       network$ = GetSymbolValue(SYM_NETWORK$)
  1458.       If network$ = gSERVER$ OR _
  1459.      GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ _   
  1460.       Then 
  1461.     notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_B1), SW_HIDE))
  1462.     notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_TEXT4), SW_HIDE))
  1463.     notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_TEXT8), SW_SHOW))
  1464.       End If
  1465.       notused% = CINT(EnableWindow (GetDlgItem(ghdlg&, IDC_B1), FALSE))
  1466.  
  1467.       '** Set the starting chapter based on the current product
  1468.       i%    = Lot_GetCurrentProduct()
  1469.       chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(i%) + gTOP$)
  1470.       chpt$ = Lot_GetFirstChild(chpt$, F_DISPLAY + F_CUSTOM)
  1471.  
  1472.       '** DND: If no first chapter then we need to do somthing
  1473.  
  1474.       WHILE (chpt$ <> "")
  1475.      product_name$ = Lot_GetChapterValStr(chpt$, F_NAME) 
  1476.      child$        = Lot_GetFirstChild(chpt$, F_DISPLAY + F_CUSTOM)
  1477.  
  1478.      '** Add new page to notebook
  1479.      notused% = RegisterCallback("CALLBACK","CUSTOM2CB")
  1480.      page% = Lot_AddPagetoNotebook(hDlg&,IDC_NOTEBOOK1,DBNM_1,product_name$)
  1481.      tab_handle& = Lot_GetPagehandle(hDlg&,IDC_NOTEBOOK1,page%)
  1482.        IF FPopulateLCB(tab_handle&, child$) = FALSE THEN
  1483.     ErrorMsg SID_ERR_POPULATELCB, ""
  1484.     ERROR STFQUIT
  1485.      END IF
  1486.  
  1487.      '** Store the page information
  1488.      gNumPages% = gNumPages% + 1
  1489.      gPageArray(gNumPages%).szChapter = chpt$
  1490.      gPageArray(gNumPages%).idPage    = page%
  1491.      gPageArray(gNumPages%).hDlgPage  = tab_handle&
  1492.      gPageArray(gNumPages%).nSel      = 1
  1493.  
  1494.      '** Make sure to save the page id of the first page. For now,
  1495.      '** use gCurrentPageIndex to save the page id of first page.
  1496.      IF gNumPages% = 1 THEN gCurrentPageIndex% = page%
  1497.  
  1498.      '** Goto next sibling of chpt$
  1499.      chpt$ = Lot_GetNextSibling(chpt$, F_DISPLAY + F_CUSTOM)  
  1500.       WEND
  1501.  
  1502.       Lot_TurnToPage hDlg&, IDC_NOTEBOOK1, gCurrentPageIndex%
  1503.       gCurrentPageIndex% = 1
  1504.       SetCustomInfo TRUE, TRUE, TRUE
  1505.  
  1506.    case "IDC_B"
  1507.       chpt$ = Lot_LCBGetItem(gPageArray(gCurrentPageIndex%).hDlgPage, _
  1508.          gPageArray(gCurrentPageIndex%).nSel,     _
  1509.          LCBITEM_CHAPTER)
  1510.       dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
  1511.       SetSymbolValue SYM_CHANGEDIRSYMBOL$,  dirsym$
  1512.  
  1513.       IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ THEN
  1514.  
  1515.      IF (dirsym$ <> SYM_LOTUSAPPDIR$ AND _
  1516.     dirsym$ <> SYM_WINDIR$ AND _
  1517.     dirsym$ <> SYM_WINSYSDIR$) THEN
  1518.     notused% = RegisterCallback ("CALLBACK", "CHANGEPRODUCTDIRCB")
  1519.     RC$ = PopupModalDlg (DBM_CHANGEDIR, DBM_CHANGEDIR)
  1520.      END IF
  1521.  
  1522.       ELSE
  1523.  
  1524.      '** For server, change the LOTUSAPPDIR can go anywhere. The
  1525.      '** user is only allowed to change the main directory.
  1526.      IF dirsym$ <> SYM_LOTUSAPPDIR$ THEN
  1527.     dirSym$ = Reg_GetDirSymbolList(Lot_GetCurrentProduct())
  1528.     '** SHOULD NEVER BE IN THIS CODE ANYWAY
  1529.     If GetListLength(dirSym$) >= 1 Then
  1530.        dirSym$ = GetListItem(dirSym$, 1)
  1531.        SetSymbolValue SYM_CHANGEDIRSYMBOL$,  dirsym$
  1532.        notused% = RegisterCallback ("CALLBACK", "CHANGEPRODUCTDIRCB")
  1533.        RC$ = PopupModalDlg (DBM_CHANGEDIR, DBM_CHANGEDIR)
  1534.     End If
  1535.      END IF
  1536.  
  1537.       END IF
  1538.  
  1539. ''      SELECT CASE RC$
  1540. ''
  1541. ''      case "OK"
  1542. ''      SetCustomInfo FALSE, TRUE, TRUE
  1543. ''      unused& = SetFocus(GetDlgItem(hDlg&, IDC_B1))
  1544. ''
  1545. ''      case "BACK"
  1546. ''      SetCustomInfo TRUE, TRUE, TRUE
  1547. ''      unused& = SetFocus(GetDlgItem(hDlg&, IDC_B1))
  1548. ''
  1549. ''      END SELECT
  1550.     SetCustomInfo FALSE, TRUE, TRUE
  1551.  
  1552.    case "IDC_NOTEBOOK"
  1553.       FOR i% = 1 TO gNumPages%
  1554.             IF gPageArray(i%).idPage = Inst% THEN
  1555.                 gCurrentPageIndex% = i%
  1556.                 gPrevInst% = -1
  1557.                 SetCustomInfo TRUE, FALSE, TRUE
  1558.             EXIT FOR
  1559.              END IF
  1560.       NEXT
  1561.  
  1562.    case "IDC_OK"
  1563.       ''**Display bitmaps the default way from now on
  1564.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, ""
  1565.  
  1566.       ResetWinWinsysSymbols
  1567.  
  1568.    case "__DLGDESTROY"
  1569.       ''**Display bitmaps the default way from now on
  1570.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, ""
  1571.  
  1572.       RemoveSymbol SYM_CUSTOMCOST$
  1573.       RemoveSymbol SYM_CHANGEDIRSYMBOL$
  1574.  
  1575.    END SELECT
  1576.  
  1577. END SUB
  1578.  
  1579. '*************************************************************************
  1580. '** SUB CUSTOM2CB (hDlg&, CtrlId%, Classes$, LInst&)
  1581. '**
  1582. '** Purpose: Page dialogs. Use with CUSTOM1
  1583. '**
  1584. '**          This dialog callback can be used only once! Do not display
  1585. '**          more than one dialog at a time with this callback!
  1586. '**            
  1587. '** Author:    DND
  1588. '** Arguments: Callback args
  1589. '** Returns:   NONE
  1590. '*************************************************************************
  1591.  
  1592. SUB CUSTOM2CB (hDlg&, CtrlId%, Classes$, LInst&)
  1593.  
  1594.    DIM chpt$, tiponly%, index%, dirsym$, notused%, Inst%
  1595.    STATIC PrevPage%
  1596.  
  1597.    Inst% = CINT(LInst&)
  1598.    
  1599.    SELECT CASE Classes$
  1600.  
  1601.       case "__DLGINIT"
  1602.      AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT1)
  1603.      AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  1604.  
  1605.    case "IDC_LCB"
  1606.  
  1607.      SetYieldActive FALSE
  1608.  
  1609.      '** If Inst% is negative that just means that the section changed.
  1610.      '** If Inst% is positive then a check box was toggled.
  1611.  
  1612.      IF Inst% < 0 THEN
  1613.         Inst%    = -Inst%
  1614.         tiponly% = TRUE
  1615.      ELSE
  1616.         tiponly% = FALSE
  1617.      END IF
  1618.  
  1619.      '** Get the chapter from the LCB item
  1620.      index% = Inst% - IDC_LCB1 + 1
  1621.      chpt$  = Lot_LCBGetItem(hDlg&, index%, LCBITEM_CHAPTER)
  1622.      gPageArray(gCurrentPageIndex%).nSel = index%
  1623.  
  1624.      '** Process the LCB info
  1625.      IF chpt$ <> "" THEN
  1626.         IF tiponly% = FALSE THEN
  1627.            Lot_ToggleChapterFilesInCopyList chpt$
  1628.         END IF
  1629.         '** Only redisplay if the page or the selection has changed
  1630.         IF (PrevPage% <> gCurrentPageIndex% OR Inst% <> gPrevInst%) THEN
  1631.            SetCustomInfo FALSE, TRUE, TRUE
  1632.         ELSE
  1633.            SetCustomInfo FALSE, TRUE, FALSE
  1634.         END IF
  1635.      END IF
  1636.      ''* Disable the Change Path.. Button if on a shared directory
  1637.      IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ THEN
  1638.         chpt$ = Lot_LCBGetItem(gPageArray(gCurrentPageIndex%).hDlgPage, _
  1639.                gPageArray(gCurrentPageIndex%).nSel,     _
  1640.                LCBITEM_CHAPTER)
  1641.         dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
  1642.         IF (dirsym$ = SYM_LOTUSAPPDIR$ OR _
  1643.           dirsym$ = SYM_COMPONENTSDIR$ OR _
  1644.           dirsym$ = SYM_WINDIR$ OR _
  1645.           dirsym$ = SYM_WINSYSDIR$) THEN
  1646.            notused% = CINT(EnableWindow (GetDlgItem(ghdlg&, IDC_B1), FALSE))
  1647.         ELSE
  1648.           IF IsWindowVisible(GetDlgItem(ghdlg&, IDC_B1)) <> FALSE THEN
  1649.         notused% = CINT(EnableWindow (GetDlgItem(ghdlg&, IDC_B1), TRUE))
  1650.           END IF
  1651.        END IF
  1652.      END IF
  1653.      '** Remember last page and selection for next time
  1654.      PrevPage% = gCurrentPageIndex%
  1655.      gPrevInst% = Inst%
  1656.  
  1657.      SetYieldActive TRUE
  1658.  
  1659.    END SELECT
  1660.  
  1661. END SUB
  1662.  
  1663. '*************************************************************************
  1664. '** SUB CHANGEPRODUCTDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  1665. '**
  1666. '** Purpose: Callback to handle dialog that lets you change one product
  1667. '**          directory.
  1668. '**            
  1669. '** Author:    DND
  1670. '** Arguments: Callback args
  1671. '** SymbolsIn: SYM_CHANGEDIRSYMBOL$ 
  1672. '** Returns:   NONE
  1673. '*************************************************************************
  1674.  
  1675. SUB CHANGEPRODUCTDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  1676.  
  1677.    STATIC drvIndex%, dirChanged%
  1678.    DIM    dirSym$, dirToChange$, dirName$, rc$, i%, olddir$, Inst%
  1679. '** UNC DIMS
  1680.    DIM    uncPath$, fullPath$, dirPath$, drvPath$   '** MZ
  1681.    DIM    drvSel%, DriveChangedFlag%  '** MZ
  1682.    DIM    curCombo$, uncOff&, unusedPath$, notused%
  1683.  
  1684.    Inst% = CINT(LInst&)
  1685.  
  1686. '**UNC stuff
  1687.    IF INSTR(Classes$, "IDC_COMBO") THEN
  1688.       i% = VAL(MID$(Classes$, 10, LEN(Classes$) - 9))
  1689.       drvIndex% = Inst%
  1690.       dirChanged%   = TRUE
  1691.       curCombo$ = GetListItem("IDC_COMBO1", Inst%)
  1692.       fullPath$ = GetListItem("IDC_EDIT",1)
  1693.       Lot_SplitUNCPath fullPath$, uncPath$, dirPath$
  1694.       uncOff& = INSTR(1, curCombo$, "\\") 
  1695.       IF uncOff > 0 THEN
  1696.     Lot_SplitUNCPath MID$(curCombo$, uncOff&), uncPath$, unusedPath$
  1697.       ELSE
  1698.     uncPath$ = ""
  1699.       END IF
  1700.       SetListItem "IDC_EDIT", 1, uncPath$ + dirPath$
  1701.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1702.       EXIT SUB
  1703.    END IF
  1704.  
  1705.    SELECT CASE Classes$
  1706.  
  1707.    case "__DLGINIT"
  1708.       dirChanged%  = FALSE
  1709.       dirSym$      = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
  1710.       dirToChange$ = GetSymbolValue(dirSym$)
  1711.       dirName$     = GetSymbolValue(dirSym$ + gNAME$)
  1712.  
  1713.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  1714.       AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  1715.  
  1716.       SetWindowText GetDlgItem(hDlg&, IDC_GROUP1), dirName$
  1717.  
  1718.       Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  1719. '      drvIndex% = SelectDriveCombo ("IDC_COMBO1", dirToChange$)
  1720.  
  1721.       IF dirSym$ =  SYM_LOTUSAPPDIR$ AND _
  1722.      GetSymbolValue(SYM_NETWORK$) <> gSTANDARD$       THEN
  1723.      i% = INSTR(dirToChange$, gLOTUSAPP$)
  1724.      IF i% > 1 THEN dirToChange$ = LEFT$(dirToChange$, i% - 1)
  1725.       END IF
  1726.  
  1727.       SetListItem "IDC_EDIT", 1, dirToChange$
  1728.       drvIndex% = ValidateEditBox(hDlg& , 1)
  1729.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1730.  
  1731.    case "IDC_EDIT"
  1732.       dirChanged% = TRUE
  1733.  
  1734.    case "IDC_BRWSDIR"
  1735.    drvSel% = ValidateBrowse(hDlg& , Inst%) 
  1736.     dirChanged% = TRUE
  1737.  
  1738.    case "IDC_COMBO1"
  1739.       drvIndex%   = Inst%
  1740.       dirChanged% = TRUE
  1741.  
  1742.    case "IDC_OK"
  1743.      IF dirChanged% = TRUE THEN
  1744.      dirSym$      = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
  1745.      olddir$      = GetSymbolValue(dirSym$)
  1746.  
  1747.      drvSel% = ValidateEditBox(hDlg& , 1)
  1748.      IF drvSel% = 0 THEN
  1749.     SetListItem "__LASTSTATUS", 1, "Q"
  1750.     EXIT SUB
  1751.      ELSE 
  1752.     drvIndex% = drvSel%
  1753.      END IF
  1754.      Lot_SplitUNCPath GetListItem("IDC_EDIT",1), uncPath$, dirPath$
  1755.      IF uncPath$ = "" THEN
  1756.      drvPath = LEFT$(GetListItem("IDC_COMBO1",drvIndex%), 2)
  1757.      ELSE
  1758.      drvPath = ""
  1759.      END IF
  1760.      dirToChange$ = drvPath$ + uncPath + dirPath$
  1761.  
  1762.  
  1763.      '** For server lotusapp dir, add on lotusapp
  1764.      IF dirSym$                      =  SYM_LOTUSAPPDIR$ AND _
  1765.     GetSymbolValue(SYM_NETWORK$) <> gSTANDARD$       THEN
  1766.     i% = TRUE
  1767.     dirToChange$ = MakePath(dirToChange$,gLOTUSAPP$)
  1768.      ELSE
  1769.     i% = FALSE     '** Use i as a temp flag
  1770.      END IF
  1771.      
  1772.      IF ValidatePath(dirToChange$) = FALSE THEN
  1773.     SetListItem "__LASTSTATUS", 1, "Q"
  1774.      ELSE
  1775.     dirSym$ = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
  1776.     SetSymbolValue dirSym$, dirToChange$
  1777.  
  1778.     '** Only call product if not server lotusapp
  1779.     IF i% = FALSE THEN
  1780.  
  1781.        '** Server is only allowed to change main product dir
  1782.        IF GetSymbolValue(SYM_NETWORK$) <> gSTANDARD$ THEN
  1783.       dirName$ = |"| + dirSym$ + |",TRUE|
  1784.        ELSE
  1785.       dirName$ = |"| + dirSym$ + |",FALSE|
  1786.        END IF
  1787.        rc$ = Lot_CallOneProductFunction(Lot_GetCurrentProduct(), _
  1788.             "PathChange", gNEXT$,    _
  1789.             FALSE, dirName$)
  1790.        If rc$ = gBACK Then
  1791.       SetListItem "IDC_EDIT", 1, Lot_ExtractDirectory(olddir$)
  1792.       drvIndex% = SelectDriveCombo ("IDC_COMBO1", olddir$)
  1793.       SetSymbolValue dirSym$, olddir$
  1794.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1795.       SetListItem "__LASTSTATUS", 1, "Q"
  1796.       EXIT SUB
  1797.        End If
  1798.  
  1799.     END IF
  1800.  
  1801.     Lot_RefreshDestination(dirSym$)
  1802.      END IF
  1803.       END IF
  1804.  
  1805.    END SELECT
  1806.  
  1807. END SUB
  1808.  
  1809. '*************************************************************************
  1810. '** SUB CHANGELOTUSAPPDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  1811. '**
  1812. '** Purpose: Change the Lotusapp dir in standard install
  1813. '**            
  1814. '** Author:    DND
  1815. '** Arguments: Callback args
  1816. '** Returns:   NONE
  1817. '*************************************************************************
  1818.  
  1819. SUB CHANGELOTUSAPPDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  1820.  
  1821.    STATIC drvIndex%, dirChanged%
  1822.    DIM    dirSym$, dirToChange$, dirName$, winLotApp$, Inst%
  1823.  
  1824.    Inst% = CINT(LInst&)
  1825.  
  1826.    SELECT CASE Classes$
  1827.  
  1828.    case "__DLGINIT"
  1829.       dirChanged%  = FALSE
  1830.       dirSym$      = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
  1831.       dirToChange$ = GetSymbolValue(dirSym$)
  1832.       dirName$     = GetSymbolValue(dirSym$ + gNAME$)
  1833.       winLotApp$   = GetWindowsDir() + gLOTUSAPP$ + "\"
  1834.  
  1835.       SetWindowText GetDlgItem(hDlg&, IDC_GROUP1), dirName$
  1836.       SetWindowText GetDlgItem(hDlg&, IDC_B1),     winLotApp$
  1837.  
  1838.       Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  1839.       drvIndex% = SelectDriveCombo ("IDC_COMBO1", dirToChange$)
  1840.  
  1841.       IF dirToChange$ = winLotApp$ THEN
  1842.      SetListItem "IDC_B", 1 , "T"
  1843.      SetListItem "IDC_B", 2 , "F"
  1844.       ELSE
  1845.      SetListItem "IDC_B", 1 , "F"
  1846.      SetListItem "IDC_B", 2 , "T"
  1847.       END IF   
  1848.       AddListItem SYM_UPDATELIST$, "IDC_B1"
  1849.       AddListItem SYM_UPDATELIST$, "IDC_B2"
  1850.  
  1851.    case "IDC_COMBO1"
  1852.       drvIndex%   = Inst%
  1853.       dirChanged% = TRUE
  1854.       SetListItem "IDC_B", 1 , "F"
  1855.       SetListItem "IDC_B", 2 , "T"
  1856.       AddListItem SYM_UPDATELIST$, "IDC_B1"
  1857.       AddListItem SYM_UPDATELIST$, "IDC_B2"
  1858.  
  1859.    case "IDC_B"
  1860.       dirChanged% = TRUE
  1861.  
  1862.    case "IDC_OK"
  1863.       IF dirChanged% = TRUE THEN
  1864.      If IsDlgButtonChecked(hDlg&,IDC_B1) = FALSE Then
  1865.     dirToChange$ = _
  1866.        MakePath(MID$(GetListItem("IDC_COMBO1",drvIndex%), 1, 2), _
  1867.        gLOTUSAPP$)
  1868.      ELSE
  1869.     dirToChange$ = GetWindowsDir() + gLOTUSAPP$
  1870.      END IF
  1871.  
  1872.      IF ValidatePath(dirToChange$) = FALSE THEN
  1873.     SetListItem "__LASTSTATUS", 1, "Q"
  1874.      ELSE
  1875.     dirSym$ = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
  1876.     SetSymbolValue dirSym$, dirToChange$
  1877.     Lot_RefreshDestination(dirSym$)
  1878.      END IF
  1879.       END IF
  1880.  
  1881.    END SELECT
  1882.  
  1883. END SUB
  1884.  
  1885. 'MARIANA
  1886. '** SUB GETLOTUSAPPDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  1887. '** Purpose: Prompts for Lotusapp dir in install
  1888. '** Author:    MZ
  1889. '** Arguments: Callback args
  1890. '** Returns:   NONE
  1891. '*************************************************************************
  1892. SUB GETLOTUSAPPDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  1893.    STATIC drvIndex%(1 to MAX_NO_DRIVECOMBOS), dirChanged%
  1894.    DIM    dirSym$, dirToChange$, dirName$, winLotApp$, Inst%
  1895.    DIM    comboBox$, editBox$, i%, InvalidLotapp%
  1896. '** unc start
  1897.    DIM    uncPath$, fullPath$, dirPath$, drvPath$, n%, hCombo&  '** MZ
  1898.    DIM    drvSel%, DriveChangedFlag%  '** MZ
  1899.    DIM    curCombo$, uncOff&, unusedPath$, NumDirs%
  1900. '** unc end
  1901.    
  1902.    Inst% = CINT(LInst&)
  1903. '** unc start
  1904. '** Handle all the combo boxes here (if any)
  1905.    IF INSTR(Classes$, "IDC_COMBO") THEN
  1906.       i% = VAL(MID$(Classes$, 10, LEN(Classes$) - 9))
  1907.       comboBox = "IDC_COMBO"+Right$(Str$(i%),1)
  1908.       editBox = "IDC_EDIT"+Right$(Str$(i%),1)
  1909.       drvIndex%(i%) = Inst%
  1910.       dirChanged%   = TRUE
  1911.       curCombo$ = GetListItem(comboBox, Inst%)
  1912.       fullPath$ = GetListItem("IDC_EDIT",i)
  1913.       Lot_SplitUNCPath fullPath$, uncPath$, dirPath$
  1914.       uncOff& = INSTR(1, curCombo$, "\\") 
  1915.       IF uncOff > 0 THEN
  1916.     Lot_SplitUNCPath MID$(curCombo$, uncOff&), uncPath$, unusedPath$
  1917.       ELSE
  1918.     uncPath$ = ""
  1919.       END IF
  1920.       SetListItem "IDC_EDIT", i, uncPath$ + dirPath$
  1921.       AddListItem SYM_UPDATELIST$, editBox
  1922.       EXIT SUB
  1923.    END IF
  1924. '** unc end
  1925.  
  1926.    SELECT CASE Classes$
  1927.  
  1928.    case "__DLGINIT"
  1929.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT2)
  1930.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT3)
  1931.       AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  1932.  
  1933.  
  1934.  
  1935.       dirChanged%  = FALSE
  1936.       dirToChange$ = GetSymbolValue(SYM_COMPONENTSDIR$)
  1937.       dirName$     = GetSymbolValue(dirSym$ + gNAME$)
  1938.  
  1939.       Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  1940.       AddListItem SYM_UPDATELIST$, "IDC_COMBO1"
  1941.       'drvIndex% = SelectDriveCombo ("IDC_COMBO1", dirToChange$)
  1942.       SetListItem "IDC_EDIT", 1, dirToChange$
  1943.       drvIndex%(1) = ValidateEditBox(hDlg& , 1)
  1944.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1945.  
  1946.  
  1947.       dirToChange$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
  1948.       dirName$     = GetSymbolValue(dirSym$ + gNAME$)
  1949.  
  1950.       Lot_GetDriveFreeSpaceList "IDC_COMBO2"
  1951.       AddListItem SYM_UPDATELIST$, "IDC_COMBO2"
  1952.       'drvIndex% = SelectDriveCombo ("IDC_COMBO2", dirToChange$)
  1953.       SetListItem "IDC_EDIT", 2, dirToChange$
  1954.       drvIndex%(2) = ValidateEditBox(hDlg& , 2)
  1955.       AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
  1956.  
  1957.    case "IDC_COMBO"
  1958.    SELECT CASE Inst%
  1959.       case 1    
  1960.        drvIndex%(1)   = Inst%
  1961.        dirChanged% = TRUE
  1962.       case 2    
  1963.        drvIndex%(2)   = Inst%
  1964.        dirChanged% = TRUE
  1965.       END SELECT
  1966.  
  1967.    case "IDC_EDIT"
  1968.       dirChanged% = TRUE
  1969.  
  1970.    case "IDC_BRWSDIR"
  1971.       drvSel% = ValidateBrowse(hDlg& , Inst%) 
  1972.       SELECT CASE Inst%
  1973.      CASE 1
  1974.      dirChanged% = TRUE
  1975.  
  1976.      CASE 2
  1977.      dirChanged% = TRUE
  1978.  
  1979.       END SELECT
  1980.  
  1981.    case "IDC_OK"
  1982.     IF dirChanged% = TRUE THEN
  1983.     ''*** Components
  1984.     '** unc start
  1985.         drvSel% = ValidateEditBox(hDlg& , 1)
  1986.         IF drvSel% = 0 THEN
  1987.         SetListItem "__LASTSTATUS", 1, "Q"
  1988.         EXIT SUB
  1989.         ELSE 
  1990.         drvIndex%(1) = drvSel%
  1991.         END IF
  1992.         Lot_SplitUNCPath GetListItem("IDC_EDIT",1), uncPath$, dirPath$
  1993.         IF uncPath$ = "" THEN
  1994.         drvPath = LEFT$(GetListItem("IDC_COMBO1",drvIndex%(1)), 2)
  1995.         ELSE
  1996.         drvPath = ""
  1997.         END IF
  1998.         dirToChange$ = drvPath$ + uncPath + dirPath$
  1999.     '** unc end
  2000.     
  2001. '     dirToChange$ = MID$(GetListItem("IDC_COMBO1",drvIndex%), 1, 2)+ _
  2002. '            GetListItem("IDC_EDIT", 1)
  2003.      IF ValidatePath(dirToChange$) = FALSE THEN
  2004.     SetListItem "__LASTSTATUS", 1, "Q"
  2005.      ELSE
  2006.     SetSymbolValue SYM_COMPONENTSDIR$, dirToChange$
  2007.     Lot_RefreshDestination(SYM_COMPONENTSDIR$)
  2008.      END IF
  2009.     ''*** Lotusapp
  2010.     '** unc start
  2011.         drvSel% = ValidateEditBox(hDlg& , 2)
  2012.         IF drvSel% = 0 THEN
  2013.         SetListItem "__LASTSTATUS", 1, "Q"
  2014.         EXIT SUB
  2015.         ELSE 
  2016.         drvIndex%(1) = drvSel%
  2017.         END IF
  2018.         Lot_SplitUNCPath GetListItem("IDC_EDIT",2), uncPath$, dirPath$
  2019.         IF uncPath$ = ""  THEN
  2020.          drvPath = LEFT$(GetListItem("IDC_COMBO2",drvIndex%(2)), 2)
  2021.          dirToChange$ = drvPath$ + uncPath + dirPath$
  2022.          IF IsLongDirPath (dirToChange$) <> FALSE THEN
  2023.             InvalidLotapp% = TRUE
  2024.          END IF
  2025.         ELSE
  2026.         InvalidLotapp% = TRUE
  2027.         END IF  
  2028.         IF  InvalidLotapp% = TRUE THEN
  2029.         drvPath = ""
  2030.         ErrorMsg SID_ERR_SHARED_NO_UNCLONG,""
  2031.         SetListItem "__LASTSTATUS", 1, "Q"
  2032.         '** set it back to the default
  2033.         dirToChange$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
  2034.         Lot_GetDriveFreeSpaceList "IDC_COMBO2"
  2035.         AddListItem SYM_UPDATELIST$, "IDC_COMBO2"
  2036.         SetListItem "IDC_EDIT", 2, dirToChange$
  2037.         drvIndex%(2) = ValidateEditBox(hDlg& , 2)
  2038.         AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
  2039.         EXIT SUB
  2040.         ELSE
  2041.         drvPath = LEFT$(GetListItem("IDC_COMBO2",drvIndex%(2)), 2)
  2042.         dirToChange$ = drvPath$ + uncPath + dirPath$
  2043.         END IF
  2044. '** unc end
  2045.  
  2046.      IF ValidatePath(dirToChange$) = FALSE THEN
  2047.     SetListItem "__LASTSTATUS", 1, "Q"
  2048.      ELSE
  2049.     SetSymbolValue SYM_LOTUSAPPDIR$, dirToChange$
  2050.     Lot_RefreshDestination(SYM_LOTUSAPPDIR$)
  2051.     'Initialize the symbols for Notes Data and ORACLE Home directories
  2052.     DL_SetNotesDataPath
  2053.     DL_SetOraclePath
  2054.      END IF
  2055.     END IF
  2056.  
  2057.    END SELECT
  2058.  
  2059. END SUB
  2060.  
  2061. '************************************************************************
  2062. '*                   End of Custom Routines                             *
  2063. '************************************************************************
  2064.  
  2065. '*************************************************************************
  2066. '** SUB SIZEOFINSTALLCB (hDlg&, CtrlId%, Classes$, LInst&)
  2067. '**
  2068. '** Purpose:   Handles the SizeOfInstall Dialog Box for Single Install
  2069. '**            Always works with the current product (should be 1).
  2070. '**
  2071. '**            With a little work we might be able to use this callback
  2072. '**            for the main size of install dialog in SmartSuite.
  2073. '**            You would need to pay attention to minimum size and
  2074. '**            current product. Plus, the path asked for would be
  2075. '**            the BASEDIR, not a product path. However, I think the
  2076. '**            logic could be added.
  2077. '**
  2078. '** In Symbols:
  2079. '**     
  2080. '** Author:    DND
  2081. '** Arguments: STANDARD CALLBACK ARGS
  2082. '** Comments:  SYM_SIZEOFINSTALL$ is an in-out param
  2083. '** Returns:
  2084. '**     
  2085. '*************************************************************************
  2086. '** unc template for multiple COMBO-TEXT boxes
  2087. SUB SIZEOFINSTALLCB (hDlg&, CtrlId%, Classes$, LInst&)
  2088.  
  2089.    STATIC drvIndex%(1 to MAX_NO_DRIVECOMBOS), dirChanged%, size$, lDistSize&, dirChanged2%
  2090.    DIM    dirSym$, dirToChange$, rc$, i%, nProds%, lcb&, notused%
  2091.    DIM    drvItem$, drvFree&, network$, Inst%, dirSym2$, dirToChange2$
  2092. '** unc start
  2093.    DIM    uncPath$, fullPath$, dirPath$, drvPath$, n%, hCombo&  '** MZ
  2094.    DIM    drvSel%, DriveChangedFlag%  '** MZ
  2095.    DIM    curCombo$, uncOff&, unusedPath$, NumDirs%
  2096.    DIM    comboBox$, editBox$
  2097. '** unc end
  2098.  
  2099.    DriveChangedFlag% = FALSE              '** MZ
  2100.  
  2101.    Inst% = CINT(LInst&)
  2102.  
  2103.    network$ = GetSymbolValue(SYM_NETWORK)
  2104.  
  2105.  
  2106. '** unc start
  2107. '** Handle all the combo boxes here (if any)
  2108.    IF INSTR(Classes$, "IDC_COMBO") THEN
  2109.       i% = VAL(MID$(Classes$, 10, LEN(Classes$) - 9))
  2110.       comboBox = "IDC_COMBO"+Right$(Str$(i%),1)
  2111.       editBox = "IDC_EDIT"+Right$(Str$(i%),1)
  2112.       drvIndex%(i%) = Inst%
  2113.       SELECT CASE i%
  2114.       
  2115.       CASE 1
  2116.       dirChanged%   = TRUE
  2117.       CASE 2
  2118.       dirchanged2% = TRUE
  2119.       END SELECT
  2120.  
  2121.       curCombo$ = GetListItem(comboBox, Inst%)
  2122.       fullPath$ = GetListItem("IDC_EDIT",i)
  2123.       Lot_SplitUNCPath fullPath$, uncPath$, dirPath$
  2124.       uncOff& = INSTR(1, curCombo$, "\\") 
  2125.       IF uncOff > 0 THEN
  2126.     Lot_SplitUNCPath MID$(curCombo$, uncOff&), uncPath$, unusedPath$
  2127.       ELSE
  2128.     uncPath$ = ""
  2129.       END IF
  2130.       SetListItem "IDC_EDIT", i, uncPath$ + dirPath$
  2131.       AddListItem SYM_UPDATELIST$, editBox
  2132.       EXIT SUB
  2133.    END IF
  2134. '** unc end
  2135.  
  2136.    SELECT CASE Classes$
  2137.    
  2138.    CASE "__DLGINIT"
  2139.  
  2140.       SetListItem "IDC_BMP", 3, STR$(IDD_CUS_BMP)
  2141.       SetListItem "IDC_BMP", 2, STR$(IDD_SRV_BMP)
  2142.       SetListItem "IDC_BMP", 1, STR$(IDD_WRK_BMP)
  2143.  
  2144.       '** Init the radio buttons
  2145.       size$ = GetSymbolValue(SYM_SIZEOFINSTALL$)
  2146.       SELECT CASE size$
  2147.  
  2148.       CASE gCUSTOM$
  2149.      SetListItem "IDC_B", 3, "T"            '** Custom
  2150.  
  2151.       CASE gLAPTOP$
  2152.      SetListItem "IDC_B", 2, "T"            '** Minimum
  2153.  
  2154.       CASE gCOMPLETE$
  2155.      SetListItem "IDC_B", 1, "T"            '** Complete
  2156.  
  2157.       END SELECT
  2158.       AddListItem SYM_UPDATELIST$, "IDC_B"
  2159.  
  2160.       AddListItem SYM_UPDATELIST$, "IDC_BMP1"
  2161.       AddListItem SYM_UPDATELIST$, "IDC_BMP2"
  2162.       AddListItem SYM_UPDATELIST$, "IDC_BMP3"
  2163.  
  2164.  
  2165.       '** Fill the product full size
  2166.       lcb& = 0
  2167.       nProds% = Reg_GetNumberOfProducts()
  2168.       FOR i% = 1 to nProds%
  2169.     IF Reg_GetUIInOrOut (i%) <> 0 THEN
  2170.     lcb& = lcb& + Reg_GetProdFullSize(i%)
  2171.     END IF 
  2172.       NEXT
  2173.       SetListItem "IDC_TEXT", 2, LdString(SID_SPACENEEDED) + _
  2174.          STR$((lcb& \ 1048576) + 1) + gStrMB$
  2175.  
  2176.       '** Fill in the product laptop size
  2177.       lcb& = 0
  2178.       FOR i% = 1 to nProds%
  2179.     IF Reg_GetUIInOrOut (i%) <> 0 THEN
  2180.     lcb& = lcb& + Reg_GetProdMinSize(i%)
  2181.     END IF 
  2182.     NEXT
  2183.     SetListItem "IDC_TEXT", 4, LdString(SID_SPACENEEDED) + _
  2184.          STR$((lcb& \ 1048576) + 1) + gStrMB$
  2185.  
  2186.     '** Set up the normal font controls
  2187.     AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT1)
  2188.     AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT2)
  2189.     AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT3)
  2190.     AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT4)
  2191.     AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT5)
  2192.     AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT10)
  2193.  
  2194.     AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  2195.     AddListItem  SYM_UPDATELIST$, "IDC_TEXT2"
  2196.     AddListItem  SYM_UPDATELIST$, "IDC_TEXT4"
  2197.  
  2198.     '** Init the path area. We only change first path in list.
  2199.     '** So far, the SmartSuite dlg does not have any paths.
  2200.  
  2201.     dirChanged%  = FALSE
  2202.     dirChanged2%  = FALSE
  2203.     IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  2204.        dirChanged%  = TRUE
  2205.        dirSym$      = Reg_GetDirSymbolList(1)
  2206.        If GetListLength(dirSym$) >= 1 Then
  2207.       dirSym$      = GetListItem(dirSym$, 1)
  2208.       dirToChange$ = GetSymbolValue(dirSym$)
  2209.       Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  2210.       SetListItem "IDC_EDIT", 1, dirToChange$
  2211.       drvIndex%(1) = ValidateEditBox(hDlg& , 1)
  2212.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  2213.        End If
  2214.  
  2215.        dirSym2$      = Reg_GetDirSymbolList(1)
  2216.        NumDirs% = Reg_GetProdSupportForExtraProdDirs(1)
  2217.  
  2218.        If GetListLength(dirSym2$) > 1 AND _
  2219.       NumDirs% = 1 Then
  2220.        dirChanged2%  = TRUE
  2221.        dirSym2$      = GetListItem(dirSym2$, 2)
  2222.        dirToChange2$ = GetSymbolValue(dirSym2$)
  2223.        Lot_GetDriveFreeSpaceList "IDC_COMBO2"
  2224.        SetListItem "IDC_EDIT", 2, dirToChange2$
  2225.        drvIndex%(2) = ValidateEditBox(hDlg& , 2)
  2226.        AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
  2227.        End If
  2228.  
  2229.      '** If server, then fill the COMPONENTS as well.
  2230.      '** TV: COMPONENTS is always IDC_EDIT/COMBO3 
  2231.      IF GetSymbolValue(SYM_NETWORK$) = gSERVER$ THEN
  2232.     dirToChange$ = GetSymbolValue(SYM_COMPONENTSDIR$)
  2233.     Lot_GetDriveFreeSpaceList "IDC_COMBO3"
  2234.     SetListItem "IDC_EDIT", 3, dirToChange$
  2235.     drvIndex%(3) = ValidateEditBox(hDlg& , 3)
  2236.     AddListItem SYM_UPDATELIST$, "IDC_EDIT3"
  2237.      END IF
  2238.  
  2239.  
  2240.      '** Take care of whether the controls are enabled or not
  2241.      IF Reg_GetProdSupportForFullInstall(1) = FALSE THEN
  2242.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_B1),    FALSE))
  2243.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT1), FALSE))
  2244.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT2), FALSE))
  2245.      END IF
  2246.      IF Reg_GetProdSupportForMinInstall(1)  = FALSE THEN
  2247.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_B2),    FALSE))
  2248.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT3), FALSE))
  2249.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT4), FALSE))
  2250.      END IF
  2251.      IF Reg_GetProdSupportForCustInstall(1) = FALSE THEN
  2252.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_B3),    FALSE))
  2253.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT5), FALSE))
  2254.      END IF
  2255.        '**** IDC_TEXT3and IDC_TEXT5 should be visible for a product with only full install
  2256.      IF (Reg_GetProdSupportForFullInstall(1) <> FALSE) AND _
  2257.     (Reg_GetProdSupportForMinInstall(1)  = FALSE)  AND _
  2258.     (Reg_GetProdSupportForCustInstall(1) = FALSE)  THEN
  2259.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT3), TRUE))
  2260.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT4), TRUE))
  2261.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT5), TRUE))
  2262.      END IF
  2263. '** Don't allow user path changes for a language install
  2264.       If GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ _   
  2265.       Then 
  2266.     notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_BRWSDIR1), SW_HIDE))
  2267.     notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_BRWSDIR1), FALSE))
  2268.     notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_BRWSDIR2), SW_HIDE))
  2269.     notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_BRWSDIR2), FALSE))
  2270.     notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_BRWSDIR3), SW_HIDE))
  2271.     notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_BRWSDIR3), FALSE))
  2272.     notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_COMBO1), FALSE))
  2273.     notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_EDIT1), FALSE))
  2274.     notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_COMBO2), FALSE))
  2275.     notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_EDIT2), FALSE))
  2276.     notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_COMBO3), FALSE))
  2277.     notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_EDIT3), FALSE))
  2278.       End If
  2279.     END IF
  2280.  
  2281.    case "IDC_COMBO1"
  2282.     drvSel% = CInt(LInst&)
  2283.     DriveChangedFlag% = TRUE
  2284.  
  2285.    case "IDC_B"
  2286.       SELECT CASE Inst%
  2287.  
  2288.       CASE 1
  2289.      size$ = gCOMPLETE$
  2290.  
  2291.       CASE 2
  2292.      size$ = gLAPTOP$
  2293.  
  2294.       CASE 3
  2295.      size$ = gCUSTOM$
  2296.  
  2297.       END SELECT
  2298.  
  2299.  
  2300.    case "IDC_EDIT"
  2301.       SELECT CASE Inst%
  2302.  
  2303.       CASE 1
  2304.      dirChanged% = TRUE
  2305.       CASE 2
  2306.      dirChanged2% = TRUE
  2307.       END SELECT
  2308.  
  2309.    case "IDC_BRWSDIR"
  2310.    drvSel% = ValidateBrowse(hDlg& , Inst%) 
  2311.       SELECT CASE Inst%
  2312.  
  2313.       CASE 1
  2314.      dirChanged% = TRUE
  2315.       CASE 2
  2316.      dirChanged2% = TRUE
  2317.       END SELECT
  2318.    
  2319.    case "IDC_OK"
  2320.       SetSymbolValue SYM_SIZEOFINSTALL$, size$
  2321.  
  2322.      '** Handle the main application path
  2323.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ AND _
  2324.         dirChanged% = TRUE                               THEN
  2325.     IF dirChanged% = TRUE THEN
  2326. '** unc start
  2327.         drvSel% = ValidateEditBox(hDlg& , 1)
  2328.         IF drvSel% = 0 THEN
  2329.         SetListItem "__LASTSTATUS", 1, "Q"
  2330.         EXIT SUB
  2331.         ELSE 
  2332.         drvIndex%(1) = drvSel%
  2333.         END IF
  2334.         Lot_SplitUNCPath GetListItem("IDC_EDIT",1), uncPath$, dirPath$
  2335.         IF uncPath$ = "" THEN
  2336.         drvPath = LEFT$(GetListItem("IDC_COMBO1",drvIndex%(1)), 2)
  2337.         ELSE
  2338.         drvPath = ""
  2339.         END IF
  2340.         dirToChange$ = drvPath$ + uncPath + dirPath$
  2341. '** unc end
  2342.         IF ValidatePath(dirToChange$) = FALSE THEN
  2343.         SetListItem "__LASTSTATUS", 1, "Q"
  2344.         EXIT SUB
  2345.         ELSE
  2346.         dirSym$ = Reg_GetDirSymbolList(1)
  2347.         If GetListLength(dirSym$) >= 1 Then
  2348.             dirSym$ = GetListItem(dirSym$, 1)
  2349.             SetSymbolValue dirSym$, dirToChange$
  2350.             rc$ = Lot_CallOneProductFunction(1, "PathChange",gNEXT$, _
  2351.             FALSE, |"| + dirSym$ + |",TRUE|)
  2352.             If rc$ = gBACK Then
  2353.             SetListItem "__LASTSTATUS", 1, "Q"
  2354.             EXIT SUB
  2355.             End If
  2356.             Lot_RefreshDestination(dirSym$)
  2357.         End If
  2358.         END IF
  2359.       END IF
  2360.     END IF
  2361.     '** Handle the secondary application path
  2362.     IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ AND _
  2363.         dirChanged2% = TRUE THEN
  2364. '** unc start
  2365.     drvSel% = ValidateEditBox(hDlg& , 2)
  2366.     IF drvSel% = 0 THEN
  2367.         SetListItem "__LASTSTATUS", 1, "Q"
  2368.         EXIT SUB
  2369.     ELSE 
  2370.         drvIndex%(2) = drvSel%
  2371.     END IF
  2372.     Lot_SplitUNCPath GetListItem("IDC_EDIT",2), uncPath$, dirPath$
  2373.     IF uncPath$ = "" THEN
  2374.         drvPath = LEFT$(GetListItem("IDC_COMBO2",drvIndex%(2)), 2)
  2375.     ELSE
  2376.         drvPath = ""
  2377.     END IF
  2378.     dirToChange2$ = drvPath$ + uncPath + dirPath$
  2379.     IF ValidatePath(dirToChange2$) = FALSE THEN
  2380.         SetListItem "__LASTSTATUS", 1, "Q"
  2381.         EXIT SUB
  2382.     ELSE
  2383.         dirSym2$ = Reg_GetDirSymbolList(1)
  2384.         If GetListLength(dirSym2$) > 1 Then
  2385.         dirSym2$ = GetListItem(dirSym2$, 2)
  2386.         SetSymbolValue dirSym2$, dirToChange2$
  2387.         rc$ = Lot_CallOneProductFunction(1, "PathChange",gNEXT$, _
  2388.              FALSE, |"| + dirSym2$ + |",TRUE|)
  2389.         If rc$ = gBACK Then
  2390.             SetListItem "__LASTSTATUS", 1, "Q"
  2391.             EXIT SUB
  2392.         End If
  2393.         Lot_RefreshDestination(dirSym2$)
  2394.         End If
  2395.     END IF
  2396.     END IF
  2397.  
  2398.      '** If this is server, then check the COMPONENTS dir
  2399.      IF GetSymbolValue(SYM_NETWORK$) = gSERVER$  AND _
  2400.     Reg_GetProdSupportForShare32(1) = 1 AND _
  2401.    GetListLength("IDC_EDIT") > 2 THEN
  2402.     drvSel% = ValidateEditBox(hDlg& , 3)
  2403.     IF drvSel% = 0 THEN
  2404.         SetListItem "__LASTSTATUS", 1, "Q"
  2405.         EXIT SUB
  2406.     ELSE 
  2407.         drvIndex%(3) = drvSel%
  2408.     END IF
  2409.     Lot_SplitUNCPath GetListItem("IDC_EDIT",3), uncPath$, dirPath$
  2410.     IF uncPath$ = "" THEN
  2411.         drvPath = LEFT$(GetListItem("IDC_COMBO3",drvIndex%(3)), 2)
  2412.     ELSE
  2413.         drvPath = ""
  2414.     END IF
  2415.     dirToChange2$ = drvPath$ + uncPath + dirPath$
  2416.     IF ValidatePath(dirToChange2$) = FALSE THEN
  2417.        SetListItem "__LASTSTATUS", 1, "Q"
  2418.        EXIT SUB
  2419.     ELSE
  2420.        SetSymbolValue SYM_COMPONENTSDIR$, dirToChange2$
  2421.        Lot_RefreshDestination(SYM_COMPONENTSDIR$)
  2422.     END IF
  2423.      END IF
  2424.      ResetWinWinsysSymbols
  2425.    END SELECT
  2426.  
  2427. DONESIZEOFINSTALLCB:
  2428.  
  2429. END SUB
  2430.  
  2431. '*************************************************************************
  2432. '** SUB DISTSIZEINSTALLCB (hDlg&, CtrlId%, Classes$, LInst&)
  2433. '**
  2434. '** Purpose:   Handles the DB_CHOOSEPATHDIST Dialog Box for Single
  2435. '**            and SmartSuite Install
  2436. '**            Always works with the current product (should be 1).
  2437. '**
  2438. '**            With a little work we might be able to use this callback
  2439. '**            for the main size of install dialog in SmartSuite.
  2440. '**            You would need to pay attention to minimum size and
  2441. '**            current product. Plus, the path asked for would be
  2442. '**            the BASEDIR, not a product path. However, I think the
  2443. '**            logic could be added.
  2444. '**
  2445. '** In Symbols:
  2446. '**     
  2447. '** Author:    DND, CMOY
  2448. '** Arguments: STANDARD CALLBACK ARGS
  2449. '** Comments:  SYM_SIZEOFINSTALL$ is an in-out param
  2450. '** Returns:
  2451. '**     
  2452. '*************************************************************************
  2453.  
  2454. SUB DISTSIZEINSTALLCB (hDlg&, CtrlId%, Classes$, LInst&)
  2455.  
  2456.    STATIC drvIndex%, dirChanged%, size$, lDistSize&
  2457.    DIM    dirSym$, dirToChange$, rc$, i%, nProds%, lcb&, notused%
  2458.    DIM    drvItem$, drvFree&, network$, Inst%
  2459. ' unc start
  2460.    DIM    uncPath$, fullPath$, dirPath$, drvPath$, n%, hCombo&  '** MZ
  2461.    DIM    drvSel%, DriveChangedFlag%  '** MZ
  2462.    DIM    curCombo$, uncOff&, unusedPath$, NumDirs%
  2463. 'unc end
  2464.  
  2465.  
  2466.    Inst% = CINT(LInst&)
  2467.  
  2468.    network$ = GetSymbolValue(SYM_NETWORK)
  2469.  
  2470. 'unc start
  2471.    IF INSTR(Classes$, "IDC_COMBO") THEN
  2472.       i% = VAL(MID$(Classes$, 10, LEN(Classes$) - 9))
  2473.       drvIndex% = Inst%
  2474.       dirChanged%   = TRUE
  2475.       curCombo$ = GetListItem("IDC_COMBO1", Inst%)
  2476.       fullPath$ = GetListItem("IDC_EDIT",1)
  2477.       Lot_SplitUNCPath fullPath$, uncPath$, dirPath$
  2478.       uncOff& = INSTR(1, curCombo$, "\\") 
  2479.       IF uncOff > 0 THEN
  2480.     Lot_SplitUNCPath MID$(curCombo$, uncOff&), uncPath$, unusedPath$
  2481.       ELSE
  2482.     uncPath$ = ""
  2483.       END IF
  2484.       SetListItem "IDC_EDIT", 1, uncPath$ + dirPath$
  2485.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  2486.    END IF
  2487. 'unc end
  2488.  
  2489.  
  2490.    SELECT CASE Classes$
  2491.    
  2492.    CASE "__DLGINIT"
  2493.       size$ = GetSymbolValue(SYM_SIZEOFINSTALL$)
  2494.       '** Fill the product full size
  2495.       lcb& = 0
  2496.       nProds% = Reg_GetNumberOfProducts()
  2497.       FOR i% = 1 to nProds%
  2498.       lcb& = lcb& + Reg_GetProdFullSize(i%)
  2499.       NEXT
  2500.       SetListItem "IDC_TEXT", 2, LdString(SID_SPACENEEDED) + _
  2501.          STR$((lcb& \ 1048576) + 1) + gStrMB$
  2502.  
  2503.  
  2504.       '** Set up the normal font controls
  2505.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT1)
  2506.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT2)
  2507.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT7)
  2508.  
  2509.       AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  2510.       AddListItem  SYM_UPDATELIST$, "IDC_TEXT2"
  2511.  
  2512.       '** Init the path area. We only change first path in list.
  2513.       '** So far, the SmartSuite dlg does not have any paths.
  2514. '      dirChanged%  = FALSE
  2515.       dirChanged%  = TRUE
  2516.       dirSym$      = Reg_GetDirSymbolList(1)
  2517.       If GetListLength(dirSym$) >= 1 Then
  2518.      dirSym$      = GetListItem(dirSym$, 1)
  2519.      dirToChange$ = GetSymbolValue(dirSym$)
  2520.      Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  2521.      SetListItem "IDC_EDIT", 1, dirToChange$
  2522.      drvIndex% = ValidateEditBox(hDlg& , 1)  
  2523.      drvItem$   = GetListItem("IDC_COMBO1",drvIndex%)
  2524.      drvFree&   = CLNG(MID$(drvItem$,3,Instr(drvItem$,";")-4))
  2525.      AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  2526.       End If
  2527.       lDistSize& = Lot_GetInfSectionSize(gDISTRIBUTIONFILES$) \ 1024
  2528.       SetListItem "IDC_TEXT", 1, STR$(lDistSize&) + gStrK$
  2529.       SetListItem "IDC_TEXT", 2, STR$(drvFree& - lDistSize&) + gStrK$
  2530.       AddListItem SYM_UPDATELIST$, "IDC_TEXT1"
  2531.       AddListItem SYM_UPDATELIST$, "IDC_TEXT2"
  2532.  
  2533.    case "IDC_COMBO1" 
  2534.   '** Handle all the combo boxes here (if any)
  2535.       drvIndex% = Inst%
  2536.       dirChanged%   = TRUE
  2537.       '** For distribution, update the text.
  2538.  
  2539.  
  2540.       drvItem$   = GetListItem("IDC_COMBO1",Inst%)
  2541.       drvFree&   = CLNG(MID$(drvItem$,3,Instr(drvItem$,";")-4))
  2542. 'changed for unc      drvFree&   = CLNG(MID$(drvItem$,3,LEN(drvItem$)-5))
  2543.       '** already computed in __DLGINIT
  2544.       '** lDistSize& = Lot_GetInfSectionSize(gDISTRIBUTIONFILES$) \ 1024
  2545.       SetListItem "IDC_TEXT", 1, STR$(lDistSize&) + gStrK$
  2546.       SetListItem "IDC_TEXT", 2, STR$(drvFree& - lDistSize&) + gStrK$
  2547.       AddListItem SYM_UPDATELIST$, "IDC_TEXT1"
  2548.       AddListItem SYM_UPDATELIST$, "IDC_TEXT2"
  2549.  
  2550.  
  2551.    case "IDC_EDIT"
  2552.       dirChanged% = TRUE
  2553.  
  2554.    case "IDC_BRWSDIR"
  2555.    drvSel% = ValidateBrowse(hDlg& , Inst%)
  2556.     drvItem$   = GetListItem("IDC_COMBO1",drvSel%)
  2557.    drvFree&   = CLNG(MID$(drvItem$,3,Instr(drvItem$,";")-4))
  2558.    SetListItem "IDC_TEXT", 2, STR$(drvFree& - lDistSize&) + gStrK$
  2559.    AddListItem SYM_UPDATELIST$, "IDC_TEXT2" 
  2560.     dirChanged% = TRUE
  2561.  
  2562.    case "IDC_OK"
  2563.       
  2564.       SetSymbolValue SYM_SIZEOFINSTALL$, size$
  2565.  
  2566.       IF dirChanged% = TRUE THEN
  2567.      '** Handle the main application path
  2568.     drvSel% = ValidateEditBox(hDlg& , 1)
  2569.       IF drvSel% = 0 THEN
  2570.      SetListItem "__LASTSTATUS", 1, "Q"
  2571.      EXIT SUB
  2572.       ELSE 
  2573.      drvIndex% = drvSel%
  2574.       END IF
  2575. '** unc start
  2576.       Lot_SplitUNCPath GetListItem("IDC_EDIT",1), uncPath$, dirPath$
  2577.       IF uncPath$ = "" THEN
  2578.      drvPath = LEFT$(GetListItem("IDC_COMBO1",drvIndex%), 2)
  2579.       ELSE
  2580.      drvPath = ""
  2581.       END IF
  2582.       dirToChange$ = drvPath$ + uncPath + dirPath$
  2583. '** unc end
  2584.      IF ValidatePath(dirToChange$) = FALSE THEN
  2585.     SetListItem "__LASTSTATUS", 1, "Q"
  2586.     EXIT SUB
  2587.      ELSE
  2588.     dirSym$ = Reg_GetDirSymbolList(1)
  2589.     If GetListLength(dirSym$) >= 1 Then
  2590.        dirSym$ = GetListItem(dirSym$, 1)
  2591.        SetSymbolValue dirSym$, dirToChange$
  2592.        rc$ = Lot_CallOneProductFunction(1, "PathChange",gNEXT$, _
  2593.              FALSE, |"| + dirSym$ + |",TRUE|)
  2594.  
  2595.        '** Not sure what to do with the return yet
  2596.  
  2597.        Lot_RefreshDestination(dirSym$)
  2598.     End If
  2599.  
  2600.     ResetWinWinsysSymbols
  2601.     '** TV:     
  2602.     IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  2603.     SetSymbolValue SYM_BASEDIR$, dirToChange$
  2604.     END IF
  2605.      END IF
  2606.  
  2607.       END IF
  2608.  
  2609.    END SELECT
  2610.  
  2611. END SUB
  2612.  
  2613. '*************************************************************************
  2614. '** SUB DISKCOPYMETHODCB (hDlg&, CtrlId%, Classes$, LInst&)
  2615. '**
  2616. '** Purpose:  Allows user to choose Server or Distribution
  2617. '** IN SYMBOLS : NETWORK=SERVER |  DISTRIBUTION    
  2618. '** OUT SYMBOLS: NETWORK=SERVER | DISTRIBUTION    
  2619. '**     
  2620. '** Author:
  2621. '** Arguments:
  2622. '**     
  2623. '**     
  2624. '** Returns:
  2625. '**     
  2626. '*************************************************************************
  2627.  
  2628. SUB DISKCOPYMETHODCB (hDlg&, CtrlId%, Classes$, LInst&)
  2629.    DIM network$, Inst%
  2630.  
  2631.    Inst% = CINT(LInst&)
  2632.  
  2633.    SELECT CASE Classes$
  2634.    
  2635.    CASE "__DLGINIT"
  2636.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  2637.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
  2638.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
  2639.       AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  2640.  
  2641.       network$ = GetSymbolValue(SYM_NETWORK$)
  2642.       IF network$ = gSERVER$ THEN
  2643.      SetListItem "IDC_B", 1, "T"
  2644.      AddListItem SYM_UPDATELIST$, "IDC_B1"
  2645.       ELSEIF network$ = gDISTRIBUTION$ THEN
  2646.      SetListItem "IDC_B", 2, "T"
  2647.      AddListItem SYM_UPDATELIST$, "IDC_B2"
  2648.       END IF
  2649.  
  2650.    CASE "IDC_B"
  2651.       SELECT CASE Inst%
  2652.       
  2653.       CASE 1
  2654.      SetSymbolValue SYM_NETWORK$, gSERVER$
  2655.  
  2656.       CASE 2
  2657.      SetSymbolValue SYM_NETWORK$, gDISTRIBUTION$
  2658.  
  2659.       END SELECT
  2660.  
  2661.    END SELECT
  2662.  
  2663. END SUB
  2664.  
  2665. '*************************************************************************
  2666. '** PUBLIC FUNCTION SRV_SUCCESSCB (hDlg&, CtrlId%, Classes$, LInst&)
  2667. '** Purpose: This is a call back for Success dlg box for Server Install.
  2668. '**          It executes the licenser.exe, if start licenser button
  2669. '**          is selected.
  2670. '**          This works with DB_SRV_SUCCESS AND DB_SRV_SUCCESS_LIC
  2671. '** Author:  MZ
  2672. '** Arguments:
  2673. '*************************************************************************
  2674.  
  2675. PUBLIC SUB SRV_SUCCESSCB (hDlg&, CtrlId%, Classes$, LInst&)
  2676.    DIM path$, exist%, ExecError%, Inst%
  2677.  
  2678.    Inst% = CINT(LInst&)
  2679.  
  2680.    SELECT CASE Classes$
  2681.  
  2682.    CASE "__DLGINIT"
  2683.       '** Set up the normal font controls
  2684.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT2)
  2685.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT3)
  2686.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT4)
  2687.       AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  2688.  
  2689.    CASE "IDC_B"
  2690.       IF Inst% = 1 THEN
  2691.      path$  = GetSymbolValue(SYM_LICDIR$)
  2692.      path$  = path$ + "licenser.exe"
  2693.      exist% = DoesFileExist(path$, femExists)
  2694.  
  2695.      '** DND: Should I be displaying where we looked for licenser?
  2696.      IF exist% = FALSE THEN
  2697.     ErrorMsgNoDlgExit SID_NO_LICENSEREXE, ""
  2698.      ELSE
  2699.     '** DND: Should I display what we could not launch?
  2700.     ExecError% = WinExec (path$, SW_SHOWNORMAL)
  2701.     IF ExecError% < 32 THEN
  2702.        ErrorMsgNoDlgExit SID_ERR_EXECLIC, ""
  2703.     END IF
  2704.      END IF
  2705.       END IF
  2706.  
  2707.    END SELECT
  2708.  
  2709. END SUB
  2710.  
  2711. '*************************************************************************
  2712. '** PUBLIC SUB LAUNCHNAGCB (hDlg&, CtrlId%, Classes$, LInst&)
  2713. '** Purpose: Sole purpose is to launch Notepad on the NAG
  2714. '**          
  2715. '**          
  2716. '** Author: Marcel Meth
  2717. '** Arguments:
  2718. '**     
  2719. '**     
  2720. '** Returns:
  2721. '**     
  2722. '*************************************************************************
  2723.  
  2724. PUBLIC SUB LAUNCHNAGCB (hDlg&, CtrlId%, Classes$, LInst&)
  2725.    DIM cmd$, ExecError%, Inst%
  2726.  
  2727.    Inst% = CINT(LInst&)
  2728.  
  2729.    SELECT CASE Classes$
  2730.  
  2731.    CASE "__DLGINIT"
  2732.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  2733.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
  2734.       AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  2735.  
  2736.    CASE "IDC_B"
  2737.  
  2738.       '** DND: Will these filenames always be the same?
  2739.  
  2740.       cmd$ = MakePath(GetSymbolValue(SYM_STF_CWDDIR$),LdString(SID_READNETTXT))
  2741.         If DoesFileExist(cmd$, femExists) Then
  2742.           cmd$ = LdString(SID_NOTEPADEXE) & " " & cmd$
  2743.         Else
  2744.     cmd$ = LdString(SID_NOTEPADEXE) & " " & MakePath(GetSymbolValue(SYM_STF_SRCDIR$),LdString(SID_READNETTXT))
  2745.         End If
  2746.       ExecError% = WinExec (cmd$, SW_SHOWNORMAL )
  2747.  
  2748.       '** DND: This does not seem like enough info for error
  2749.       IF ExecError% < 32 THEN
  2750.      ErrorMsg SID_ERR_EXECNOTEPAD, ""
  2751.       END IF
  2752.  
  2753.    END SELECT   
  2754.  
  2755. END SUB
  2756.  
  2757. '*************************************************************************
  2758. '*************************** Local Functions *****************************
  2759. '*************************************************************************
  2760.  
  2761. '*************************************************************************
  2762. '** SUB SetCustomInfo(fOnTab%,fNewSpace%,fUpdateAll%)
  2763. '**
  2764. '** Purpose: Fill with info for custom dialogs. Call this every time
  2765. '**          the LCB changes selection or state.
  2766. '**            
  2767. '** Author:    DND
  2768. '** Arguments: fOnTab%     TRUE if tab has focus
  2769. '**            fNewSpace%  TRUE if we should get new space requirements
  2770. '**            fUpdateAll% TRUE if we should update all fields on the dlg
  2771. '** Returns:   NONE
  2772. '*************************************************************************
  2773.  
  2774. SUB SetCustomInfo(fOnTab%,fNewSpace%,fUpdateAll%)
  2775.  
  2776. '   STATIC lckSpace&, drvSave$
  2777.    DIM    chpt$, dest$, dirName$, dirSym$, drv$, tips$, tmpDrv$, szCost$
  2778.    DIM    lckCost&, lckAvail&
  2779.    DIM    bitmap%, n%, notused%, lnotused&, hwndtemp&
  2780.  
  2781.    '** Get the tip and chapter from the current LCB item
  2782.    IF fOnTab% = FALSE THEN
  2783.       chpt$ = Lot_LCBGetItem(gPageArray(gCurrentPageIndex%).hDlgPage, _
  2784.          gPageArray(gCurrentPageIndex%).nSel,     _
  2785.          LCBITEM_CHAPTER)
  2786.    ELSE
  2787.       chpt$ = gPageArray(gCurrentPageIndex%).szChapter$
  2788.    END IF
  2789.    IF chpt$ = "" THEN EXIT SUB
  2790.  
  2791.    tips$ = Lot_GetChapterValStr(chpt$, F_TIPS)   
  2792.  
  2793.    '** If instructed then build the custom cost list
  2794.    IF GetListLength(SYM_CUSTOMCOST$) = 0 OR fNewSpace% <> FALSE THEN
  2795.       lnotused& = LcbGetChapterCost("", "", SYM_CUSTOMCOST$, "")
  2796.    END IF
  2797.  
  2798.    '** Get the destination directory and dirName
  2799.    dirSym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
  2800. '** I commented these lines out for SPR PSCN2UN7GX.  I left
  2801. '** the code here in case my actions have nasty side effects.
  2802. '   IF dirsym$ <> SYM_LOTUSAPPDIR$ AND GetSymbolValue(SYM_NETWORK$) <> gSTANDARD$ THEN
  2803. '      dirSym$ = Reg_GetDirSymbolList(Lot_GetCurrentProduct())
  2804. '      dirSym$ = GetListItem(dirSym$, 1)
  2805. '   END IF
  2806.  
  2807.    dest$    = GetSymbolValue(dirSym$)
  2808.    dirName$ = GetSymbolValue(dirSym$ + gNAME$)
  2809.    drv$     = MID$(dest$, 1, 1)
  2810. '** UNC stuff
  2811.    IF drv$ = "\" THEN
  2812.        Lot_SplitUNCPath dest$, drv$, tmpDrv$
  2813.        szCost$ = GetListItem(drv$,2)
  2814.        IF szCost$ = "" THEN
  2815.      lckCost& = 0
  2816.        ELSE
  2817.      lckCost& = CLNG(szCost$) \ 1024
  2818.        END IF
  2819.    ELSE
  2820.        n%       = ASC(LCASE$(drv$)) - ASC("a") + 1
  2821.        lckCost& = CLNG(GetListItem(SYM_CUSTOMCOST$, n%)) \ 1024
  2822.    END IF
  2823.    '** Set the space available
  2824. '** I commented this out because the space value would be inacurate if
  2825. '** free space on a drive changed between visits to the LCB.
  2826. '** I left the code here in case calling GetFreeSpaceForDrive 
  2827. '** proved to be too much of a performance hit
  2828. '**   IF drv$ = drvSave$ THEN
  2829. '**      lckAvail& = lckSpace&
  2830. '**   ELSE
  2831. '**      IF MID$(drv$,1,1) = "\" THEN
  2832. '**        szCost$ = GetListItem(drv$,4) 'get the drivefree space for the
  2833. '**        IF szCost$ <> "" THEN         'unc volume
  2834. '**          lckAvail& = CLNG(szCost$)
  2835. '**        ELSE
  2836. '**          lckAvail& = 0
  2837. '**        END IF
  2838. '**      ELSE
  2839.     lckAvail& = GetFreeSpaceForDrive(drv$)
  2840. '**        lckSpace& = lckAvail&
  2841. '**        drvSave$  = drv$
  2842. '**      END IF
  2843. '**   END IF
  2844.    IF fUpdateAll% <> FALSE THEN
  2845.       '** write out the tip text
  2846.     SetWindowText GetDlgItem(gPageArray(gCurrentPageIndex%).hDlgPage&, IDC_TEXT1), tips$
  2847.  
  2848.       '** Set the bitmap (if any)
  2849.       bitmap% = Lot_GetChapterValInt(chpt$, F_BITMAP)
  2850.         lnotused& = SendMessage(GetDlgItem(gPageArray(gCurrentPageIndex%).hDlgPage&, IDC_BMP1), WM_COMMAND, _
  2851.                             UM_SETBITMAP, bitmap%)
  2852.  
  2853.       '** Set all the values in the dialogs
  2854.       '** SetWindowText GetDlgItem(gPageArray(gCurrentPageIndex%).hDlgPage&, IDC_TEXT1), tips$
  2855.       SetWindowText GetDlgItem(ghdlg&, IDC_TEXT4), dest$
  2856.       SetWindowText GetDlgItem(ghdlg&, IDC_TEXT8), dest$
  2857.       SetWindowText GetDlgItem(ghdlg&, IDC_TEXT5), dirName$
  2858.    END IF
  2859.  
  2860.    SetWindowText GetDlgItem(ghdlg&, IDC_TEXT2), Lot_MakeSizeString(lckCost&)
  2861.    SetWindowText GetDlgItem(ghdlg&, IDC_TEXT3), Lot_MakeSizeString(lckAvail&)
  2862.  
  2863.       ''* Disable the Change Path.. Button if on a shared directory
  2864.    IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ AND _
  2865.       IsWindowVisible(GetDlgItem(ghdlg&, IDC_B1)) <> FALSE THEN
  2866.       IF dest$ = GetSymbolValue(SYM_LOTUSAPPDIR$) THEN
  2867.        notused% = CINT(EnableWindow (GetDlgItem(ghdlg&, IDC_B1), FALSE))
  2868.       ELSE
  2869.        notused% = CINT(EnableWindow (GetDlgItem(ghdlg&, IDC_B1), TRUE))
  2870.       END IF
  2871.       ''* Disable the Change Path.. Button if on a tab, not an item
  2872.       IF fOnTab% = TRUE THEN _
  2873.      notused% = CINT(EnableWindow (GetDlgItem(ghdlg&, IDC_B1), FALSE))
  2874.    END IF
  2875.  
  2876. END SUB
  2877.  
  2878.  
  2879. PUBLIC SUB ResetWinWinsysSymbols()
  2880. '** Purpose:    Reset WINDIR, WINSYSDIR to the value of SymVal$ for server
  2881. '**             or set it back if change from server -> other
  2882. '** Author:     MZ, JMD
  2883. '** Arguments:  
  2884. '*************************************************************************
  2885.  
  2886.    DIM   network$, SymVal$
  2887.  
  2888.    network$ = GetSymbolValue(SYM_NETWORK$)
  2889.    IF network$ = gSERVER$ THEN
  2890.  
  2891.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  2892.      SymVal$ = Reg_GetDirSymbolList(1)
  2893.      If GetListLength(SymVal$) >= 1 Then
  2894.     SymVal$ = GetListItem(SymVal$, 1)
  2895.     SymVal$ = GetSymbolValue(SymVal$)
  2896.      Else
  2897.     '** RESOURCE! ***
  2898.     ErrorMsg SID_ERR_SRV_MUST_HAVE_MAINDIR, "" 
  2899.     ERROR STFQUIT
  2900.      End If
  2901.       ELSE
  2902.      SymVal$ = GetSymbolValue(SYM_BASEDIR$)
  2903.       END IF
  2904.  
  2905.       SetSymbolValue SYM_WINDIR$,    SymVal$ + "win\"
  2906.       SetSymbolValue SYM_WINSYSDIR$, SymVal$ + "winsys\"
  2907.  
  2908.       Lot_RefreshDestination(SYM_WINDIR$)
  2909.       Lot_RefreshDestination(SYM_WINSYSDIR$)
  2910.  
  2911.    ELSE
  2912.       Lot_InitializeWinWinsysSym
  2913.    END IF
  2914.  
  2915. END SUB
  2916.  
  2917. '** DND: This function should be moved to Toolkit. We might also
  2918. '**      want to think about calling this function whenever a destination
  2919. '**      directory is entered.
  2920.  
  2921. FUNCTION DoesFileExistInDir (dirlist$) AS INTEGER
  2922. '** Purpose:   Takes a list of directories and puts up an error message
  2923. '**            listing all the directories which have files in them. 
  2924. '** In Symbols: 
  2925. '** OUT symbols: 
  2926. '**             
  2927. '**     
  2928. '** Author:  JYOTI KEDIA
  2929. '** Arguments: list of directories
  2930. '**     
  2931. '**     
  2932. '** Returns: TRUE
  2933. '**     
  2934. '*************************************************************************
  2935.    DIM errstr$, n%, i%, dirname$, RC%, temp$, sz$
  2936.  
  2937.    DoesFileExistInDir = TRUE
  2938.    errstr$ = ""
  2939.    n% = GetListLength(dirlist$)
  2940.    for i% = 1 to n%
  2941.       dirname$ = GetListItem(dirlist$,i%) 
  2942.       rc% = DoesDirExist(dirname$)
  2943.       If DoesDirExist(dirname$)Then                
  2944.      temp$ = Lot_Dir(dirname$+"\*.*") 
  2945.      if temp$ <> "" Then 
  2946.     errstr$ = errstr$ + CHR$(10) + CHR$(10) + "     " + dirname$
  2947.      end if
  2948.       end if
  2949.    Next
  2950.        
  2951.    if errstr$ <> "" Then
  2952.       sz$ = LdString(SID_DIR_NOT_EMPTY) + errstr$
  2953.       RC% = DoMsgBox(sz$,LdString(SID_TKT_STD_TITLE),MB_OKCANCEL + MB_ICONEXCLAMATION) 
  2954.       if RC% <> 1 Then
  2955.      SetListItem "__LASTSTATUS",1,"Q"
  2956.      EXIT FUNCTION
  2957.       end if 
  2958.    end if
  2959.  
  2960. END FUNCTION
  2961.  
  2962. '*************************************************************************
  2963. '** NODELOTUSAPPCB
  2964. '** Purpose:    Called only during node install, if the lotusapp
  2965. '**             directory was not put on same drive as main product
  2966. '**             directory on the server (by the sys administrator)
  2967. '**
  2968. '** IN SYMBOLS  NAME, COMPANY, NETWORK  
  2969. '**     
  2970. '** Author: Marcel Meth
  2971. '** Arguments:
  2972. '**     
  2973. '**     
  2974. '** Returns:
  2975. '**     
  2976. '*************************************************************************
  2977. SUB NODELOTUSAPPCB (hDlg&, CtrlId%, Classes$, LInst&)
  2978.    DIM i%, netLotusapp$, dr$, ndrives%, S$, l%, newpath$, oldnetLotusapp$
  2979.    STATIC drvIndex%
  2980.    DIM Inst%
  2981.  
  2982.    Inst% = CINT(LInst&)
  2983.  
  2984.    SELECT CASE Classes$
  2985.  
  2986.    CASE "__DLGINIT"
  2987.  
  2988.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  2989.       AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  2990.  
  2991.       netLotusapp$ = GetSymbolValue(SYM_NETLOTUSAPP$)
  2992.       dr$ = MID$(netLotusapp$,1,1)
  2993.  
  2994.       Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  2995.       drvIndex% = SelectDriveCombo ("IDC_COMBO1", dr$)
  2996.       ndrives% = GetListLength("IDC_COMBO1")
  2997.       FOR i% = 1 to ndrives%
  2998.      '** Fix the strings in the combo box
  2999.      S$ = GetListItem("IDC_COMBO1", i%)
  3000.      SetListItem "IDC_COMBO1", i%, MID$(S$,1,2)
  3001.       NEXT
  3002.       AddListItem SYM_UPDATELIST$,"IDC_COMBO1"
  3003.  
  3004.    case "IDC_COMBO1"
  3005.       drvIndex%   = Inst%
  3006.  
  3007.    case "IDC_OK"
  3008.       dr$ = MID$(GetListItem("IDC_COMBO1",drvIndex%), 1, 1)
  3009.       netLotusapp$ = GetSymbolValue(SYM_NETLOTUSAPP$)
  3010.       l% = LEN(netLotusapp$)
  3011.       netLotusapp$ = LCASE$(dr$ & MID$(netLotusapp$, 2, l%-1) )
  3012.       oldnetLotusapp$ = netLotusapp$
  3013.       If DoesDirExist(netLotusapp$) = 1 Then
  3014.       SetSymbolValue SYM_NETLOTUSAPP$, netLotusapp$
  3015.       Else
  3016.     newpath$ = TrimNetlotusapp$(netLotusapp$)
  3017.     If newpath$ <> "" Then  
  3018.     netLotusapp$ = newpath$
  3019.     Else
  3020.     netLotusapp$ = oldnetLotusapp$
  3021.     ShowPathError SID_ERR_DIRSYNTAX, SID_NODENONEXISTLOTUSAPPDIR,_
  3022.         Lot_TrimEndSlash (netLotusapp$)
  3023.     SetListItem "__LASTSTATUS", 1, "Q"
  3024.     GOTO DONEOK
  3025.     End If
  3026.       End If        
  3027.    DONEOK:
  3028.  
  3029.    END SELECT
  3030.  
  3031.  
  3032. END SUB
  3033.  
  3034. '** SUB SRVNODEOPTIONSCB (hDlg&, CtrlId%, Classes$, LInst&)
  3035. '** Purpose: Drives DBSUIT_SRV_NODEOPTIONS dialog
  3036. '** Author:    MZ
  3037. '** Arguments: Callback args
  3038. '** Returns:   NONE
  3039. '** Restriction: this call back works only in custom install
  3040. '*************************************************************************
  3041. SUB SRVNODEOPTIONSCB (hDlg&, CtrlId%, Classes$, LInst&)
  3042.    DIM chpt$, firstchpt$, ProdName$, child$, dirsym$,toggle%,Selection%,sel%,Written%
  3043.    DIM NumOfProds%, OptNum%, OptName$, tiponly%,ProdNum%, Selected$, prodno$
  3044.    DIM RC$, i%, j%,k%, notused%, Item$, flag$, SaveInst%, index%,OptKeyWord$
  3045.    DIM Inst%
  3046.  
  3047.    Inst% = CINT(LInst&)
  3048.  
  3049.    SELECT CASE Classes$
  3050.  
  3051.    case "__DLGINIT"
  3052.  
  3053.       ' If no products are registered exit
  3054.       NumOfProds% = Reg_GetNumberOfProducts()
  3055.       IF NumOfProds%=0 THEN
  3056.      EXIT SUB
  3057.       END IF
  3058.  
  3059.       ' Make the right hand text not bold
  3060.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT1)
  3061.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT3)
  3062.       AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  3063.  
  3064.       ' Turn of the display during this operation
  3065.       Lot_LCBSetRedraw hDlg&, 0
  3066.       Lot_LCBResetContent hDlg&
  3067.  
  3068.       ' Loop through products
  3069.       FOR i% = 1 TO NumOfProds%
  3070.      Reg_ReSetAllNodeOptsSelToDefaults i%
  3071.      OptNum%=Reg_GetNumofNodeOptions(i%)
  3072.      IF OptNum% <> 0 THEN
  3073.     chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(i%) + gTOP$)
  3074.     IF firstchpt$ = "" THEN     
  3075.     firstchpt$ = chpt$
  3076.     END IF
  3077.     Lot_SetSpaceDirTip hDlg&,chpt$,1 - IDC_LCB1 + 1,i%,FALSE
  3078.     ProdName$ = Lot_GetChapterValStr(chpt$, F_NAME) 
  3079.     Written% = 0
  3080.        ' Loop through the options
  3081.     FOR j% = 1 TO OptNum%
  3082.     ' Indent the option name under the product
  3083.     OptKeyWord$ = Reg_GetNodeOptionStr(i%,j%)
  3084.     chpt$ = Lot_GetChapterFromKeyword(OptKeyWord$)
  3085.     IF INT(Lot_GetChapterValInt(chpt$,F_INOROUT)) = 1 THEN
  3086.        IF Written% = 0 THEN
  3087.           ' Write: check box selected
  3088.           '        Name of the product;
  3089.           '        no size;
  3090.           '        number of node options for this product;
  3091.           '        product number;
  3092.           '        G for group
  3093.           Item$="1"+ProdName$+";;"+STR(OptNum%)+";"+STR(i%)+";G"
  3094.           IF Lot_LCBAddItem(hDlg&, Item$) = 0 THEN
  3095.          ErrorMsg SID_ERR_POPULATELCB, ""
  3096.          ERROR STFQUIT
  3097.           END IF
  3098.           Written% = 1
  3099.        END IF
  3100.  
  3101.        OptName$ = "    "+Lot_GetChapterValStr(chpt$, F_NAME)
  3102.        ' Write: check box selected
  3103.        '        Indented Name of the feature;
  3104.        '        size of the feature in Kb;
  3105.        '        chapter number;
  3106.        '        product number;
  3107.        '        M for member;
  3108.        '        OptKeyWord$;
  3109.        '        OptSequence
  3110.        Selected$ = Reg_IsNodeOptionSelected(i%,j%)
  3111.        IF Selected$ = STR(1) THEN
  3112.           Item$="1"+OptName$+";"+ _
  3113.          Lot_MakeSizeString(Lot_GetInfChapterSize(chpt$)\1024) _
  3114.          +";"+chpt$+";"+STR(i%)+";M;"+OptKeyWord$+";"+STR(j%)
  3115.        ELSE
  3116.           Item$="0"+OptName$+";"+ _
  3117.          Lot_MakeSizeString(Lot_GetInfChapterSize(chpt$)\1024) _
  3118.          +";"+chpt$+";"+STR(i%)+";M;"+OptKeyWord$+";"+STR(j%)
  3119.        END IF 
  3120.        IF Lot_LCBAddItem(hDlg&, Item$) = 0 THEN
  3121.           ErrorMsg SID_ERR_POPULATELCB, ""
  3122.           ERROR STFQUIT
  3123.        END IF
  3124.     ELSE
  3125.        Reg_ReSetNodeOptionSelected i%,j%,0
  3126.     END IF
  3127.      NEXT
  3128.  
  3129.      END IF
  3130.      NEXT
  3131.  
  3132.      ' Turn on the display
  3133.       Lot_LCBSetRedraw hDlg&, 1
  3134.  
  3135.      ' Select the first item in the listbox
  3136.      Lot_LCBSetSel hDlg&, 1
  3137.      prodno$  = Lot_LCBGetItem(hDlg&,1,5)   '***5-productnumber
  3138.      Lot_SetSpaceDirTip hDlg&,firstchpt$,1,CINT(prodno$),FALSE
  3139.  
  3140.    case "IDC_LCB"
  3141.  
  3142.     SetYieldActive FALSE    ' turn off yielding while handling lcb
  3143.  
  3144.       '** If Inst% is negative that just means that the section changed.
  3145.       '** If Inst% is positive then a check box was toggled.
  3146.       SaveInst% = Inst%
  3147.       IF Inst% < 0 THEN
  3148.      Inst%    = -Inst%
  3149.      tiponly% = TRUE
  3150.      toggle% = FALSE
  3151.       ELSE
  3152.      tiponly% = FALSE
  3153.      toggle% = TRUE
  3154.       END IF
  3155.  
  3156.       ' Find what check box was hit
  3157.       index% = Inst% - IDC_LCB1 + 1
  3158.       ' Get the chapter no or number of options from the check box info
  3159.       chpt$  = Lot_LCBGetItem(hDlg&, index%, LCBITEM_CHAPTER)
  3160.       ' Get the product No from the check box info
  3161.       ProdNum% = CINT(Lot_LCBGetItem(hDlg&, index%, 5))
  3162.       ' Read Group/Member flag from the list of check boxes
  3163.       flag$ = Lot_LCBGetItem(hDlg&, index%, 6)
  3164.       ' Read if the check box is checked or not
  3165.       Selection% = CINT(Lot_LCBGetItem(hDlg&, index%, LCBITEM_SELECTED))
  3166.       ' Read the Keyword from the check box info
  3167.       OptKeyWord$ = Lot_LCBGetItem(hDlg&, index%, 7)
  3168.  
  3169.       '** Process the LCB info
  3170.  
  3171.       '** If you toggle a group
  3172.       IF flag$ = "G" AND toggle% = TRUE THEN
  3173.       FOR i% = 1 TO CINT(chpt$)
  3174.     IF Selection% = 0 AND _
  3175.        Lot_LCBGetCount(hDlg&)+1 > index%+i% THEN
  3176.        sel% = CINT(Lot_LCBGetItem(hDlg&, index%+i%, LCBITEM_SELECTED))
  3177.        IF sel% = 1 AND Lot_LCBGetItem(hDlg&, index%+i%, 6) <> "G" THEN
  3178.       notused% = Lot_LCBReplaceItem(hDlg&, index%+i%, LCBITEM_SELECTED,"0")
  3179.       chpt$  = Lot_LCBGetItem(hDlg&, index%+i%, LCBITEM_CHAPTER)
  3180.       Reg_ReSetNodeOptionSelected ProdNum%, i%, 0
  3181.        END IF
  3182.     ELSEIF Selection% = 1 AND _
  3183.        Lot_LCBGetCount(hDlg&)+1 > index%+i% THEN
  3184.        sel% = CINT(Lot_LCBGetItem(hDlg&, index%+i%, LCBITEM_SELECTED))
  3185.        IF sel% = 0 AND Lot_LCBGetItem(hDlg&, index%+i%, 6) <> "G" THEN
  3186.       notused% = Lot_LCBReplaceItem(hDlg&, index%+i%, LCBITEM_SELECTED,"1")
  3187.       chpt$  = Lot_LCBGetItem(hDlg&, index%+i%, LCBITEM_CHAPTER)
  3188.       Reg_ReSetNodeOptionSelected ProdNum%, i%, 1
  3189.        END IF
  3190.     END IF
  3191.      NEXT
  3192.  
  3193.  
  3194.       END IF
  3195.  
  3196.       '** If you select a group
  3197.       IF flag$ = "G" AND toggle% = FALSE THEN
  3198.      prodno$  = Lot_LCBGetItem(hDlg&, index%,5)   '***5-productnumber
  3199.      chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(CINT(prodno$)) + gTOP$)
  3200.      Lot_SetSpaceDirTip hDlg&,chpt$,index%,ProdNum%,TRUE
  3201.       END IF
  3202.  
  3203.       '** If you toggle a member
  3204.       IF flag$ = "M" AND toggle% = TRUE THEN
  3205.      sel% = CINT(Lot_LCBGetItem(hDlg&, index%, LCBITEM_SELECTED))
  3206.      Lot_SetSpaceDirTip hDlg&,chpt$,index%,ProdNum%,FALSE
  3207.      IF sel% = 0 THEN
  3208.      Reg_ReSetNodeOptionSelected ProdNum%, CINT(Lot_LCBGetItem(hDlg&, index%, 8)), 0
  3209.      ELSE
  3210.      Reg_ReSetNodeOptionSelected ProdNum%, CINT(Lot_LCBGetItem(hDlg&, index%, 8)), 1
  3211.      END IF
  3212.       END IF
  3213.       '** If you select a member
  3214.       IF flag$ = "M" AND toggle% = FALSE THEN
  3215.      Lot_SetSpaceDirTip hDlg&,chpt$,index%,ProdNum%,TRUE
  3216.       END IF
  3217.  
  3218.     SetYieldActive TRUE     ' turn yielding back on
  3219.  
  3220.    END SELECT
  3221.  
  3222. END SUB
  3223.  
  3224. '*************************************************************************
  3225.  
  3226. SUB NODENODEOPTIONSCB (hDlg&, CtrlId%, Classes$, LInst&)
  3227. '** Purpose: Drives DBSUIT_NODE_NODEOPTIONS dialog
  3228. '** Author:    MZ
  3229. '** Arguments: Callback args
  3230. '** Returns:   NONE
  3231. '*************************************************************************
  3232. '** UNC TEMPLATE FOR SINGLE COMBO-EDIT BOXES
  3233.    STATIC drvIndex%, dirChanged%
  3234.    DIM    dirSym$, dirToChange$, dirName$, rc$, i%, Chapter$
  3235.    DIM    AllProdNum%,prodNum%,AllOptNum%,OptName$,OptNum%,notused%
  3236.    DIM    Inst%
  3237. ' unc start
  3238.    DIM    uncPath$, fullPath$, dirPath$, drvPath$, n%, hCombo&  '** MZ
  3239.    DIM    drvSel%, DriveChangedFlag%  '** MZ
  3240.    DIM    curCombo$, uncOff&, unusedPath$, NumDirs%
  3241. 'unc end
  3242.  
  3243.    Inst% = CINT(LInst&)
  3244. 'unc start
  3245.    IF INSTR(Classes$, "IDC_COMBO") THEN
  3246.       i% = VAL(MID$(Classes$, 10, LEN(Classes$) - 9))
  3247.       drvIndex% = Inst%
  3248.       dirChanged%   = TRUE
  3249.       curCombo$ = GetListItem("IDC_COMBO1", Inst%)
  3250.       fullPath$ = GetListItem("IDC_EDIT",1)
  3251.       Lot_SplitUNCPath fullPath$, uncPath$, dirPath$
  3252.       uncOff& = INSTR(1, curCombo$, "\\") 
  3253.       IF uncOff > 0 THEN
  3254.     Lot_SplitUNCPath MID$(curCombo$, uncOff&), uncPath$, unusedPath$
  3255.       ELSE
  3256.     uncPath$ = ""
  3257.       END IF
  3258.       SetListItem "IDC_EDIT", 1, uncPath$ + dirPath$
  3259.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  3260.       EXIT SUB
  3261.    END IF
  3262. 'unc end
  3263.  
  3264.    SELECT CASE Classes$
  3265.  
  3266.    case "__DLGINIT"
  3267.       dirChanged%  = FALSE
  3268.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT1)
  3269.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT4)
  3270.       AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  3271.       SetListItem "IDC_B", 1, "T"
  3272.       Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  3273.  
  3274.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  3275.      dirSym$ = Reg_GetDirSymbolList(1)
  3276.      dirSym$ = GetListItem(dirSym$,1) 
  3277.      dirToChange$ = GetSymbolValue(dirSym$)
  3278.       ELSE
  3279.      dirToChange$ = GetSymbolValue(SYM_BASEDIR$)
  3280.       END IF
  3281.       SetSymbolValue SYM_CHANGEDIRSYMBOL$, dirSym$
  3282.       SetListItem "IDC_EDIT", 1, dirToChange$
  3283.       drvIndex% = ValidateEditBox(hDlg& , 1)
  3284. '** unc end
  3285.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  3286.       AddListItem SYM_UPDATELIST$, "IDC_B1"
  3287.  
  3288.       'Loop through the products and find the avail node options
  3289.       AllProdNum% = 0
  3290.       AllProdNum% = Reg_GetNumberOfProducts()
  3291.       IF AllProdNum% <> 0 THEN
  3292.  
  3293.      'Loop through the products
  3294.      FOR prodNum%=1 TO AllProdNum%
  3295.     AllOptNum% = 0
  3296.     AllOptNum% = Reg_GetNumofNodeOptions(prodNum%)
  3297.     IF AllOptNum% <> 0 THEN
  3298.  
  3299.        'Loop though registered options and turn them on or of 
  3300.        FOR OptNum%=1 TO AllOptNum% 
  3301.       OptName$ = Reg_GetNodeOptionStr(prodNum%,OptNum%)
  3302.       IF Lot_IsTheNodeOptionsAvailToNode(prodNum%,OptName$) = 0 THEN
  3303.          Chapter$ = Lot_GetChapterFromKeyword(OptName$)
  3304.          notused% = Lot_SetChapterFilesInCopyListInOrOut(Chapter$,0)
  3305.       ELSE
  3306.          Chapter$ = Lot_GetChapterFromKeyword(OptName$)
  3307.          notused% = Lot_SetChapterFilesInCopyListInOrOut(Chapter$,1)
  3308.        END IF
  3309.        NEXT
  3310.     END IF
  3311.      NEXT
  3312.       END IF
  3313.  
  3314.    case "IDC_EDIT"
  3315.       dirChanged% = TRUE
  3316.  
  3317.    case "IDC_BRWSDIR"
  3318.    drvSel% = ValidateBrowse(hDlg& , Inst%) 
  3319.     dirChanged% = TRUE
  3320.  
  3321.    case "IDC_COMBO1"
  3322.       drvIndex%   = Inst%
  3323.       dirChanged% = TRUE
  3324.  
  3325.  
  3326.    case "IDC_OK"
  3327.       IF dirChanged% = TRUE THEN
  3328.     drvSel% = ValidateEditBox(hDlg& , 1)
  3329.     IF drvSel% = 0 THEN
  3330.        SetListItem "__LASTSTATUS", 1, "Q"
  3331.        EXIT SUB
  3332.     ELSE 
  3333.        drvIndex% = drvSel%
  3334.     END IF
  3335. '** unc start
  3336.     Lot_SplitUNCPath GetListItem("IDC_EDIT",1), uncPath$, dirPath$
  3337.      IF uncPath$ = "" THEN
  3338.      drvPath = LEFT$(GetListItem("IDC_COMBO1",drvIndex%), 2)
  3339.      ELSE
  3340.      drvPath = ""
  3341.      END IF
  3342.      dirToChange$ = drvPath$ + uncPath + dirPath$
  3343.  
  3344. '** unc end
  3345.     IF ValidatePath(dirToChange$) = FALSE THEN
  3346.     SetListItem "__LASTSTATUS", 1, "Q"
  3347.     ELSE
  3348.     dirSym$ = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
  3349.     SetSymbolValue dirSym$, dirToChange$
  3350.     rc$ = Lot_CallOneProductFunction(Lot_GetCurrentProduct(), _
  3351.             "PathChange", gNEXT$,    _
  3352.             FALSE, |"| + dirSym$ + |",FALSE|)
  3353.     If rc$ = gBACK Then
  3354.         SetListItem "__LASTSTATUS", 1, "Q"
  3355.         EXIT SUB
  3356.     End If
  3357.     Lot_RefreshDestination(dirSym$)
  3358.     END IF
  3359.       END IF
  3360.       'Change the selection for Node options
  3361.       IF Lot_IsAnyNodeOptAvailToNode() <> 0 THEN
  3362.      IF IsDlgButtonChecked(hDlg&,IDC_B1) = FALSE THEN
  3363.     'Loop through the products and turn the options of
  3364.     AllProdNum% = 0
  3365.     AllProdNum% = Reg_GetNumberOfProducts()
  3366.     IF AllProdNum% <> 0 THEN
  3367.        FOR prodNum%=1 TO AllProdNum%
  3368.       AllOptNum% = 0
  3369.       AllOptNum% = Reg_GetNumofNodeOptions(prodNum%)
  3370.       IF AllOptNum% <> 0 THEN
  3371.          'Loop though registered options and turn them of 
  3372.          FOR OptNum%=1 TO AllOptNum% 
  3373.         OptName$ = Reg_GetNodeOptionStr(prodNum%,OptNum%)
  3374.         Chapter$ = Lot_GetChapterFromKeyword(OptName$)
  3375.         notused% = Lot_SetChapterFilesInCopyListInOrOut(Chapter$,0)
  3376.          NEXT
  3377.       END IF
  3378.        NEXT
  3379.     END IF
  3380.      ELSE
  3381.     'Loop through the products and turn the options on
  3382.     AllProdNum% = 0
  3383.     AllProdNum% = Reg_GetNumberOfProducts()
  3384.     IF AllProdNum% <> 0 THEN
  3385.        FOR prodNum%=1 TO AllProdNum%
  3386.       AllOptNum% = 0
  3387.       AllOptNum% = Reg_GetNumofNodeOptions(prodNum%)
  3388.       IF AllOptNum% <> 0 THEN
  3389.          'Loop though registered options and turn them on
  3390.          FOR OptNum%=1 TO AllOptNum% 
  3391.         OptName$ = Reg_GetNodeOptionStr(prodNum%,OptNum%)
  3392.         Chapter$ = Lot_GetChapterFromKeyword(OptName$)
  3393.         IF Lot_IsTheNodeOptionsAvailToNode(prodNum%,OptName$) = 1 THEN
  3394.            notused% = Lot_SetChapterFilesInCopyListInOrOut(Chapter$,1)
  3395.         END IF
  3396.          NEXT
  3397.       END IF
  3398.        NEXT
  3399.     END IF
  3400.  
  3401.      END IF
  3402.       END IF
  3403.  
  3404.  
  3405.    END SELECT
  3406.  
  3407. END SUB
  3408. '*************************************************************************
  3409. SUB Lot_SetSpaceDirTip(hDlg&,chpt$,index%,ProdNum%,tiponly%)
  3410. '** Purpose: Fill with info for Server NodeOptions dialogs. Call this every
  3411. '**          time the LCB changes selection or state in  SRVNODEOPTIONSCB
  3412. '** Author:    MZ
  3413. '** Arguments: hDlg&
  3414. '**            Chapter$
  3415. '**            index%
  3416. '**            tiponly%
  3417. '*************************************************************************
  3418.    STATIC lckSpace&, drvSave$
  3419.    DIM    dest$, dirName$, dirSym$, drv$, tips$, uncVol$, dirPath$
  3420.    DIM    lckCost&, lckAvail&
  3421.    DIM    bitmap%, n%, notused%
  3422.  
  3423.    '** Get the tip and chapter from the current LCB item
  3424.    tips$ = Lot_GetChapterValStr(chpt$, F_TIPS)   
  3425.  
  3426.    '** If instructed then build the custom cost list
  3427.    IF GetListLength(SYM_CUSTOMCOST$) = 0 OR tiponly <> FALSE THEN
  3428.       notused% = LcbGetChapterCost("", "", SYM_CUSTOMCOST$, "")
  3429.    END IF
  3430.  
  3431.    '** Get the destination directory and dirName
  3432.    dirSym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
  3433.    IF dirsym$ <> SYM_LOTUSAPPDIR$ AND GetSymbolValue(SYM_NETWORK$) <> gSTANDARD$ THEN
  3434.       dirSym$ = Reg_GetDirSymbolList(ProdNum%)
  3435.       dirSym$ = GetListItem(dirSym$, 1)
  3436.    END IF
  3437.  
  3438.    dest$    = GetSymbolValue(dirSym$)
  3439.    dirName$ = GetSymbolValue(dirSym$ + gNAME$)
  3440.    drv$     = MID$(dest$, 1, 1)
  3441.    Lot_SplitUNCPath dest$, uncVol$, dirPath$
  3442.    IF uncVol$ = "" THEN
  3443.      n%       = ASC(drv$) - ASC("a") + 1
  3444.      lckCost& = CLNG(GetListItem(SYM_CUSTOMCOST$, n%)) \ 1024
  3445.    ELSE
  3446.      lckCost& = CLNG(GetListItem(uncVol$, UNC_COST)) \ 1024
  3447.  
  3448.    END IF
  3449.    '** Set the space available
  3450.    IF drv$ = drvSave$ THEN
  3451.       lckAvail& = lckSpace&
  3452.    ELSE
  3453.       lckAvail& = GetFreeSpaceForDrive(dest$)
  3454.       lckSpace& = lckAvail&
  3455.       drvSave$  = drv$
  3456.    END IF
  3457.  
  3458.    '** Set the bitmap (if any)
  3459.    bitmap% = Lot_GetChapterValInt(chpt$, F_BITMAP)
  3460.    IF bitmap% <> 0 THEN
  3461.       SetListItem "IDC_BMP", 1, STR$(bitmap%)
  3462.       AddListItem SYM_UPDATELIST$, "IDC_BMP1"
  3463.    END IF
  3464.  
  3465.    '** Set all the values in the dialogs
  3466.    SetWindowText GetDlgItem(hDlg&, IDC_TEXT1), tips$
  3467.    SetWindowText GetDlgItem(hDlg&, IDC_TEXT5), Lot_MakeSizeString(lckCost&)
  3468.    SetWindowText GetDlgItem(hDlg&, IDC_TEXT7), Lot_MakeSizeString(lckAvail&)
  3469.    SetWindowText GetDlgItem(hDlg&, IDC_TEXT9), dest$
  3470.    'SetWindowText GetDlgItem(hDlg&, IDC_TEXT8), dirName$
  3471.  
  3472. END SUB
  3473.  
  3474. '*************************************************************************
  3475. SUB AUTOEXECCB (hDlg&, CtrlId%, Classes$, LInst&)
  3476. '** Purpose: 
  3477. '**          
  3478. '** Author:    Christopher Moy
  3479. '** Arguments: hDlg&
  3480. '**            CtrlId%
  3481. '**            Classes$
  3482. '**            LInst&
  3483. '*************************************************************************
  3484.  
  3485.    DIM modflag%, notused1$, Inst%
  3486.  
  3487.    Inst% = CINT(LInst&)
  3488.    
  3489.  
  3490.    SELECT CASE Classes$
  3491.  
  3492.    CASE "__DLGINIT"
  3493.      AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  3494.      AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
  3495.      AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
  3496.      AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
  3497.      AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT5)
  3498.      AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  3499.  
  3500.    CASE "IDC_OK"                    '** Yes button
  3501.      modflag% = 0
  3502.      IF GetSymbolValue(SYM_NEEDNOTES$) <> gFALSE$ THEN
  3503.     modflag% = 1            '** autoexec needs notes
  3504.      END IF
  3505.      IF GetSymbolValue(SYM_NEEDSHARE$) <> gFALSE$ THEN
  3506.     modflag% = modflag% + 2 '** autoexec needs share
  3507.      END IF
  3508.      IF modflag% <> FALSE THEN
  3509.     notused1$=ModifyAutoexec(modflag%, 1, "AUTOEXEC.LTS")
  3510.      END IF
  3511.      SetSymbolValue SYM_AUTOEXEC_CHOICE$, gAUTO$
  3512.  
  3513.    CASE "IDC_MENU"                  '** Make Copy button **
  3514.      modflag% = 0               '** test flag situation
  3515.      IF GetSymbolValue(SYM_NEEDNOTES$) <> gFALSE$ THEN
  3516.     modflag% = 1            '** autoexec needs notes
  3517.      END IF
  3518.      IF GetSymbolValue(SYM_NEEDSHARE$) <> gFALSE$ THEN
  3519.     modflag% = modflag% + 2 '** autoexec needs share
  3520.      END IF
  3521.      IF modflag% <> FALSE THEN
  3522.     notused1$=ModifyAutoexec(modflag%, 0, "AUTOEXEC.LTS")
  3523.      END IF
  3524.      SetSymbolValue SYM_AUTOEXEC_CHOICE$, gAUTOCOPY$
  3525.  
  3526.    CASE "IDC_CONTINUE"                '** No button
  3527.      SetSymbolValue SYM_AUTOEXEC_CHOICE$, gMAN$
  3528.  
  3529.    END SELECT
  3530.  
  3531. END SUB
  3532.  
  3533. '*************************************************************************
  3534. SUB INSTALLCOMPLETECB (hDlg&, CtrlId%, Classes$, LInst&)
  3535. '** Purpose: 
  3536. '**          
  3537. '** Author:    Christopher Moy
  3538. '** Arguments: hDlg&
  3539. '**            CtrlId%
  3540. '**            Classes$
  3541. '**            LInst&
  3542. '*************************************************************************
  3543.    DIM notused1$, hwnd%, lr%, Inst%
  3544.  
  3545.    Inst% = CINT(LInst&)
  3546.    
  3547.    SELECT CASE Classes$
  3548.  
  3549.    CASE "__DLGINIT"
  3550.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  3551.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
  3552.       AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  3553.  
  3554. %rem
  3555.    CASE "IDC_CONTINUE"                     '** Restart button
  3556.  
  3557.       notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNext, FALSE, gALLPRODUCTS,"")
  3558.       hwnd%=FindWindow("LInstallWClass",LdString(SID_INST_WINDOW_TITLE))
  3559. ' Japanese build
  3560. '     hwnd%=FindWindow("LInstallWClass","âìü[â^âX âCâôâXâgü[âïâvâìâOâëâÇé╓éµéñé▒é╗")
  3561.       lr%=SendMessage(hwnd%, WM_COMMAND, UM_REBOOTFLAG, 0)
  3562. %endrem
  3563.      
  3564.    CASE "IDC_OK"                    '** Done button
  3565.  
  3566.    END SELECT
  3567.  
  3568. END SUB
  3569. '*************************************************************************
  3570.  
  3571. SUB PARENTDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  3572. '** Purpose: Drives DB_PARENTDIR dialog
  3573. '** Author:    MZ,TV
  3574. '** Arguments: Callback args
  3575. '** Returns:   NONE
  3576. '*************************************************************************
  3577.    STATIC drvIndex%(1 to MAX_NO_DRIVECOMBOS)
  3578. '   STATIC dirChanged%
  3579.    DIM    dirSym$, dirToChange$, dirName$, rc$, i%, Chapter$, Inst%
  3580.    DIM    AllProdNum%,prodNum%,AllOptNum%,OptName$,OptNum%,notused%
  3581. '** unc stuff
  3582.    DIM    uncPath$, dirPath$, drvPath$ '** MZ
  3583.    DIM    drvSel%, DriveChangedFlag%  '** MZ
  3584.    DIM    uncOff&, unusedPath$, combobox$, editbox$
  3585.    DIM  curCombo$, fullPath$
  3586.  
  3587.    DriveChangedFlag% = FALSE
  3588.  
  3589.    Inst% = CINT(LInst&)
  3590.  
  3591. '** Handle all the combo boxes here (if any)
  3592.    IF INSTR(Classes$, "IDC_COMBO") THEN
  3593.       i% = VAL(MID$(Classes$, 10, LEN(Classes$) - 9))
  3594.       comboBox = "IDC_COMBO"+Right$(Str$(i%),1)
  3595.       editBox = "IDC_EDIT"+Right$(Str$(i%),1)
  3596.       drvIndex%(i%) = Inst%
  3597. '      dirChanged%   = TRUE
  3598.       curCombo$ = GetListItem(comboBox, Inst%)
  3599.       fullPath$ = GetListItem("IDC_EDIT",i)
  3600.       Lot_SplitUNCPath fullPath$, uncPath$, dirPath$
  3601.       uncOff& = INSTR(1, curCombo$, "\\") 
  3602.       IF uncOff > 0 THEN
  3603.     Lot_SplitUNCPath MID$(curCombo$, uncOff&), uncPath$, unusedPath$
  3604.       ELSE
  3605.     uncPath$ = ""
  3606.       END IF
  3607.       SetListItem "IDC_EDIT", i, uncPath$ + dirPath$
  3608.       AddListItem SYM_UPDATELIST$, editBox
  3609.       EXIT SUB
  3610.    END IF
  3611. '** unc end
  3612.  
  3613.  
  3614.    SELECT CASE Classes$
  3615.  
  3616.    case "__DLGINIT"
  3617. '      dirChanged%  = FALSE
  3618.       'For server, want to update always, since we fiddle with the drive list
  3619. '     IF  GetSymbolValue(SYM_NETWORK$) = gSERVER$ THEN dirChanged%  = TRUE
  3620.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT1)
  3621.       AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  3622.       Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  3623.       dirToChange$ = GetSymbolValue(SYM_PARENTDIR$)
  3624.       SetListItem "IDC_EDIT", 1, dirToChange$
  3625.       drvIndex%(1) = ValidateEditBox(hDlg& , 1)
  3626.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  3627.  
  3628. '   case "IDC_EDIT"
  3629. '      dirChanged% = TRUE
  3630.  
  3631.    case "IDC_BRWSDIR"
  3632.    drvSel% = ValidateBrowse(hDlg& , Inst%) 
  3633. '        dirChanged% = TRUE
  3634.  
  3635.    case "IDC_OK"
  3636. '     IF dirChanged% = TRUE THEN
  3637.     drvSel% = ValidateEditBox(hDlg& , 1)
  3638.     IF drvSel% = 0 THEN
  3639.         SetListItem "__LASTSTATUS", 1, "Q"
  3640.         EXIT SUB
  3641.     ELSE 
  3642.       drvIndex%(1) = drvSel%
  3643.     END IF
  3644. '** UNC stuff
  3645.       Lot_SplitUNCPath GetListItem("IDC_EDIT",1), uncPath$, dirPath$
  3646.       IF uncPath$ = "" THEN
  3647.     drvPath = LEFT$(GetListItem("IDC_COMBO1",drvIndex%(1)), 2)
  3648.       ELSE
  3649.     drvPath = ""
  3650.       END IF
  3651.       dirToChange$ = drvPath$ + uncPath + dirPath$
  3652.       IF ValidatePath(dirToChange$) = FALSE THEN
  3653.     SetListItem "__LASTSTATUS", 1, "Q"
  3654.       ELSE
  3655.     SetSymbolValue SYM_PARENTDIR$, dirToChange$
  3656.     IF Reg_GetProdSupportForShare32(1) = 1 THEN
  3657.     ' SetTheComponentsDir
  3658.     END IF      
  3659.     Lot_RefreshDestination(SYM_PARENTDIR$)
  3660.       END IF
  3661. '    END IF
  3662.     END SELECT
  3663.  
  3664. END SUB
  3665. '*************************************************************************
  3666.  
  3667.  
  3668.